forked from slab/quill
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Typeform/ENG-179-migrate-to-gha
[ENG-127] gha migration
- Loading branch information
Showing
6 changed files
with
108 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
env: | ||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1 | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
browser: ["mac-chrome-latest","mac-firefox-latest","mac-safari-latest","windows-chrome-latest","windows-firefox-latest","windows-edge-latest","ios-latest"] | ||
name: Build assets | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.6.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install Node.js dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Lint & Karma | ||
env: | ||
BROWSER: ${{ matrix.browser }} | ||
run: npm run lint-and-karma || npm run lint-and-karma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['CI'] | ||
branches: [develop] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
build: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.6.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: Set GitHub packages registry | ||
run: | | ||
npm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GH_TOKEN }} | ||
npm config set @typeform:registry https://npm.pkg.github.com/ | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install Node.js dependencies | ||
run: npm ci | ||
|
||
- name: Deploy | ||
if: contains(github.ref, 'refs/heads/develop') | ||
run: | | ||
npm run build | ||
npm run semantic-release |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters