Merge pull request #400 from fospring/feat-migrate-example #252
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: | |
pull_request: | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 8 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint code | |
run: pnpm lint | |
- name: Format code | |
run: pnpm format | |
- name: Run git status | |
run: git status | |
- name: Check that lints where commited | |
run: test -z "$(git status --porcelain)" | |
- name: Build | |
run: pnpm build | |
- name: Check that all build artifacts where commited | |
run: test -z "$(git status --porcelain)" | |
- name: Run tests | |
run: pnpm test |