Skip to content

release: v1.5.0

release: v1.5.0 #39

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths-ignore: ['**.md']
pull_request:
branches: [main]
paths-ignore: ['**.md']
schedule:
# schedule to run on the first of each month
- cron: '0 0 1 * *'
jobs:
test:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18, 20]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: setup node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: restore yarn cache directory
id: yarn-cache
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
run: yarn --frozen-lockfile
- name: run tests
run: yarn test --coverage
- name: upload coverage artifact
uses: actions/upload-artifact@v4
if: matrix.node == 20
with:
name: coverage
path: coverage
coverage:
name: Codecov
needs: [test]
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage
- name: upload to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}