newer version of node setup #6
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, lint and test | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
branches: [main] | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['20'] | |
bun-version: [latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Set up bun ${{ matrix.bun-version }} | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: bun i --frozen-lockfile | |
- name: Check if lint is passing | |
run: bun run checkformat | |
- name: Run the tests | |
run: bun run test | |
- name: Build | |
run: npm run build |