From e05b6df876524abba7e18e09d0fdbc99a32b6ddc Mon Sep 17 00:00:00 2001 From: Qi Zhang <50432983+Zhangqi910@users.noreply.github.com> Date: Wed, 12 Aug 2020 10:09:35 +0800 Subject: [PATCH 1/3] Create CI --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..5d2eede7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x] + + steps: + - uses: actions/checkout@v2 + - 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 From 164c5942c6a6cbda5cbf864a78d6d0d6f74d5ec0 Mon Sep 17 00:00:00 2001 From: Qi Zhang <50432983+Zhangqi910@users.noreply.github.com> Date: Wed, 12 Aug 2020 10:26:29 +0800 Subject: [PATCH 2/3] Add test --- .github/workflows/main.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d2eede7..469554f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,3 +30,27 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test + + test: + needs: build + runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-2016] + node-version: [10.x, 12.x] + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@master + with: + name: webpack artifacts + path: public + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, and test + run: | + npm install + npm test + env: + CI: true From 8e26dad2a4f5147daec74341bdcc78211d39cbef Mon Sep 17 00:00:00 2001 From: Qi Zhang <50432983+Zhangqi910@users.noreply.github.com> Date: Mon, 31 Aug 2020 13:54:23 +0800 Subject: [PATCH 3/3] Update main.yml --- .github/workflows/main.yml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 469554f1..280b5c8a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,8 +7,6 @@ name: CI on: push: branches: [ master ] - pull_request: - branches: [ master ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -30,27 +28,3 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test - - test: - needs: build - runs-on: ubuntu-latest - strategy: - matrix: - os: [ubuntu-latest, windows-2016] - node-version: [10.x, 12.x] - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@master - with: - name: webpack artifacts - path: public - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, and test - run: | - npm install - npm test - env: - CI: true