Update the node version to be consistent between the tests and publishing. Adds yarn cacheing to the setup-node action. Adds a conditional action for the publishing so we don't publish a release the release tagging fails.
31 lines
542 B
YAML
31 lines
542 B
YAML
name: CI
|
|
|
|
on:
|
|
push: { branches: ["0.x"] }
|
|
pull_request: { branches: ["0.x"] }
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: yarn
|
|
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
|
|
- name: Lint
|
|
run: yarn lint
|
|
|
|
- name: Type Check
|
|
run: yarn build
|
|
|
|
- name: Test
|
|
run: yarn test --coverage
|