chore(deps): update actions/checkout action to v4 #180
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
build: | |
name: Node unit tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ['14', '16', '18'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache .pnpm-store | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies | |
uses: pnpm/action-setup@v2.4.0 | |
with: | |
version: 6.23.6 | |
run_install: true | |
- name: Lint source | |
run: | | |
pnpm lint:ci | |
- name: Build packages | |
run: | | |
pnpm build | |
- name: Run tests | |
run: | | |
pnpm test:ci | |
env: | |
CI: true | |
- name: Generate Code Coverage | |
# only when running in node v16 | |
if: matrix.node == 16 | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: 'Consume changesets' | |
if: github.event_name == 'push' && github.repository == 'ivandotv/fuerte' && matrix.node == 16 && github.ref == 'refs/heads/master' | |
uses: changesets/action@v1 | |
id: 'changesets' | |
with: | |
# This expects you to have a script called release which does a build for your packages and calls changeset publish | |
publish: pnpm release | |
commit: version bump | |
title: Next release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: 'Generate docs' | |
if: steps.changesets.outputs.published == 'true' | |
run: pnpm gen:docs | |
- name: Commit docs | |
if: steps.changesets.outputs.published == 'true' | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'Generate docs' |