Skip to content

Commit

Permalink
Merge pull request #5 from CadenGjy/Improve-CI-1
Browse files Browse the repository at this point in the history
Improve CI
  • Loading branch information
CadenGjy committed Apr 3, 2020
2 parents e569e32 + edc5259 commit a2cec65
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Node CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: [push]

jobs:
build:
- uses: actions/upload-artifact@master
needs: build
name: webpack artifacts
path: public/

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: npm install and build webpack
run: |
npm install
npm run build
test:
- uses: actions/download-artifact@master
with:
name: webpack artifacts
path: public
- name: npm install, and test
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x]
os: [ubuntu-lastest, windows-2016]
node-version: [8.x, 10.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: npm install, and test
run: |
npm install
npm test
env:
CI: true

0 comments on commit a2cec65

Please sign in to comment.