e6263de79e
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
102 lines
2.5 KiB
YAML
102 lines
2.5 KiB
YAML
name: packwatch CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
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
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
needs: dependencies
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- 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
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
needs: dependencies
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [14, 16, 18]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
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 }}
|
|
- run: |
|
|
yarn
|
|
yarn test:coverage
|
|
- name: Coverage
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
fail_ci_if_error: false
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: dependencies
|
|
strategy:
|
|
matrix:
|
|
node-version: [14, 16, 18]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
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 }}
|
|
- run: |
|
|
yarn
|
|
yarn build
|