Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
chore(github-actions): add github actions to this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodvs committed Feb 28, 2021
1 parent 917c2d2 commit c73e96a
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 92 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: build branch

on: [push, pull_request]

jobs:

test:
runs-on: ubuntu-latest
name: Check branch
steps:
- uses: actions/checkout@v2

# Install Node 12
- uses: actions/setup-node@v1
with:
node-version: 12

# Cache node modules
- uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# Install environment
- run: npm config set spin false
- run: npm install -g npm@7
- run: npm install -g codecov
- run: npm --version

# Install Dependencies
- run: npm ci

# Run tests
- run: npm run lint:js
- run: npm run lint:hbs
- run: npm test
- run: codecov --file=coverage/node/lcov.info
- run: codecov --file=coverage/ember/lcov.info

regression:
needs: test
runs-on: ubuntu-latest
name: Check ember-try for [${{matrix.scenario}}]
strategy:
matrix:
scenario: [ember-lts-2.18, ember-lts-3.4, ember-release, ember-beta, ember-default-with-jquery]
steps:
- uses: actions/checkout@v2

# Install Node 12
- uses: actions/setup-node@v1
with:
node-version: 12

# Install environment
- run: npm config set spin false
- run: npm install -g npm@7
- run: npm --version

# Install Dependencies
- run: npm ci

# Run ember-try
- run: node_modules/.bin/ember try:one ${{matrix.scenario}}
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: release artifacts

on:
workflow_run:
branches:
- master
workflows: ["build branch"]
types:
- completed

jobs:
release:
runs-on: ubuntu-latest
name: Check branch
steps:
- uses: actions/checkout@v2

# Install Node 12
- uses: actions/setup-node@v1
with:
node-version: 12

# Cache node modules
- uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# Install environment
- run: npm config set spin false
- run: npm install -g npm@7
- run: npm --version

# Install Dependencies
- run: npm ci

# Run semantic relase
- run: npx semantic-release

# Build the project
- run: npm run build -- -prod

# Deploy to GitHub Pages
# Using https://github.com/marketplace/actions/deploy-to-github-pages
- uses: JamesIves/[email protected]
with:
folder: dist

73 changes: 73 additions & 0 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: build branch

on:
schedule:
- cron: '0 0 * * 0' # weekly

jobs:

test:
runs-on: ubuntu-latest
name: Check branch
steps:
- uses: actions/checkout@v2

# Install Node 12
- uses: actions/setup-node@v1
with:
node-version: 12

# Cache node modules
- uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# Install environment
- run: npm config set spin false
- run: npm install -g npm@7
- run: npm install -g codecov
- run: npm --version

# Install Dependencies
- run: npm ci

# Run tests
- run: npm run lint:js
- run: npm run lint:hbs
- run: npm test
- run: codecov --file=coverage/node/lcov.info
- run: codecov --file=coverage/ember/lcov.info

regression:
needs: test
runs-on: ubuntu-latest
name: Check ember-try for [${{matrix.scenario}}]
strategy:
matrix:
scenario: [ember-lts-2.18, ember-lts-3.4, ember-release, ember-beta, ember-default-with-jquery]
steps:
- uses: actions/checkout@v2

# Install Node 12
- uses: actions/setup-node@v1
with:
node-version: 12

# Install environment
- run: npm config set spin false
- run: npm install -g npm@7
- run: npm --version

# Install Dependencies
- run: npm ci

# Run ember-try
- run: node_modules/.bin/ember try:one ${{matrix.scenario}}
90 changes: 0 additions & 90 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ember-cli-webcomponents-bundler

[![Build Status](https://travis-ci.com/BBVAEngineering/ember-cli-webcomponents-bundler.svg?branch=master)](https://travis-ci.com/BBVAEngineering/ember-cli-webcomponents-bundler)
[![Build Status](https://github.com/github/docs/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/BBVAEngineering/ember-cli-webcomponents-bundler/actions)
[![GitHub version](https://badge.fury.io/gh/BBVAEngineering%2Fember-cli-webcomponents-bundler.svg)](https://badge.fury.io/gh/BBVAEngineering%2Fember-cli-webcomponents-bundler)
[![NPM version](https://badge.fury.io/js/ember-cli-webcomponents-bundler.svg)](https://badge.fury.io/js/ember-cli-webcomponents-bundler)
[![Dependency Status](https://david-dm.org/BBVAEngineering/ember-cli-webcomponents-bundler.svg)](https://david-dm.org/BBVAEngineering/ember-cli-webcomponents-bundler)
Expand Down
1 change: 0 additions & 1 deletion testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
],
browser_args: {
Chrome: [
process.env.TRAVIS ? '--no-sandbox' : null,
'--disable-gpu',
'--headless',
'--remote-debugging-port=0',
Expand Down

0 comments on commit c73e96a

Please sign in to comment.