2020-03-01 01:19:20 +00:00
|
|
|
name: packwatch CI
|
2020-03-01 00:38:31 +00:00
|
|
|
|
2021-06-05 15:15:04 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
2020-03-01 00:38:31 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-03-22 04:41:07 +00:00
|
|
|
dependencies:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14, 16, 18]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{env.cache-name}}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
|
|
|
|
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
|
|
|
|
run: yarn
|
|
|
|
|
2020-03-01 00:38:31 +00:00
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-22 04:41:07 +00:00
|
|
|
needs: dependencies
|
2020-03-01 00:38:31 +00:00
|
|
|
|
|
|
|
steps:
|
2023-02-09 18:35:52 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-22 04:41:07 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2020-03-01 00:38:31 +00:00
|
|
|
with:
|
2023-03-22 04:15:39 +00:00
|
|
|
node-version: 18
|
2023-03-22 04:41:07 +00:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-18
|
|
|
|
- run: |
|
|
|
|
yarn
|
|
|
|
yarn lint
|
2020-03-01 00:38:31 +00:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-22 04:41:07 +00:00
|
|
|
needs: dependencies
|
2020-03-01 00:38:31 +00:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-03-22 04:15:39 +00:00
|
|
|
node-version: [14, 16, 18]
|
2020-03-01 00:38:31 +00:00
|
|
|
|
|
|
|
steps:
|
2023-02-09 18:35:52 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-03-01 00:38:31 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2023-03-21 05:33:59 +00:00
|
|
|
uses: actions/setup-node@v3
|
2020-03-01 00:38:31 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2023-03-22 04:41:07 +00:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
|
|
|
|
- run: |
|
|
|
|
yarn
|
|
|
|
yarn test:coverage
|
2020-03-01 00:38:31 +00:00
|
|
|
- name: Coverage
|
2023-03-22 04:46:43 +00:00
|
|
|
uses: codecov/codecov-action@v3
|
2020-03-01 00:38:31 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
2020-03-06 20:51:22 +00:00
|
|
|
fail_ci_if_error: false
|
2020-03-01 00:38:31 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-22 04:41:07 +00:00
|
|
|
needs: dependencies
|
2020-03-01 00:38:31 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-03-22 04:15:39 +00:00
|
|
|
node-version: [14, 16, 18]
|
2020-03-01 00:38:31 +00:00
|
|
|
|
|
|
|
steps:
|
2023-02-09 18:35:52 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-03-01 00:38:31 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2023-03-21 05:33:59 +00:00
|
|
|
uses: actions/setup-node@v3
|
2020-03-01 00:38:31 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2023-03-22 04:41:07 +00:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
id: dependencies-cache
|
|
|
|
env:
|
|
|
|
cache-name: dependencies-cache
|
|
|
|
with:
|
|
|
|
path: .yarn
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node-version }}
|
|
|
|
- run: |
|
|
|
|
yarn
|
|
|
|
yarn build
|