Merge pull request #30 from kinde-oss/renovate/codecov-codecov-action… #139
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: Build and test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Setting up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Enabling pre-post scripts | |
run: pnpm config set enable-pre-post-scripts true | |
- run: pnpm install | |
- run: pnpm lint | |
- name: Cache pnpm modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm- | |
- run: pnpm build | |
- run: pnpm test:coverage | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5.0.7 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |