Skip to content

Merge pull request #46 from neostfox/master #130

Merge pull request #46 from neostfox/master

Merge pull request #46 from neostfox/master #130

Workflow file for this run

name: Test
on:
- push
- pull_request
jobs:
test:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
# - 16
- 14
- 12
if: "!contains(github.event.head_commit.message, 'skip-test') && !contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache ~/.pnpm-store
uses: actions/cache@v2
env:
cache-name: cache-pnpm-store
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.node-version }}-test-
${{ runner.os }}-
- name: Install pnpm@6
run: npm i -g pnpm@6
- run: pnpm i
- run: pnpm run build --if-present
- run: pnpm test -- --coverage
- name: Codecov
uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
gh-release-changelog:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
- uses: imcuttle/gh-release-changelog@v1
if: startsWith(github.ref, 'refs/tags/')
with:
checkPkgAvailable: false
token: ${{ secrets.GITHUB_TOKEN }}