Skip to content

Commit

Permalink
build(workflow): update github action files
Browse files Browse the repository at this point in the history
  • Loading branch information
ph1p committed Sep 1, 2021
1 parent a00ef94 commit 4200177
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 11 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test and Build

on: [push]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm run build
- run: npm test
9 changes: 4 additions & 5 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: npm install and test
run: |
npm install
npm test
- run: npm i
- run: npm run build
- run: npm test

release:
if: github.event.base_ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: test
steps:
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/vercel-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
name: Deploy example on vercel
on: [push]

on:
push:
branches:
- master

jobs:
deploy:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: '14'
- run: npm install
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm run build
- run: npm test

deploy:
runs-on: ubuntu-latest
needs: test
steps:
- name: build
run: |
cd example
Expand Down

0 comments on commit 4200177

Please sign in to comment.