Skip to content

Commit

Permalink
Update node.js.yml
Browse files Browse the repository at this point in the history
yamls suck
  • Loading branch information
syntaxsec authored Feb 16, 2024
1 parent e475ef3 commit f18269b
Showing 1 changed file with 40 additions and 32 deletions.
72 changes: 40 additions & 32 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node


name: Node.js CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main", "dev"]

jobs:
build:
name: Backend test
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./quirknotes/backend

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: mongod --dbpath=./data/db
- run: npm run dev
name: Node.js CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main", "dev"]

jobs:
build:
name: Backend test
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./quirknotes/backend

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
mongodb-version: ['latest']

- name: MongoDB in GitHub Actions
uses: supercharge/[email protected]
with:
mongodb-version: ${{matrix.mongodb-version}}
- name: mongo
uses: supercharge/[email protected]
with:
mongodb-version: ${{matrix.mongodb-version}}

- run: npm i
- run: npm test
- run: npm run dev & npm test

0 comments on commit f18269b

Please sign in to comment.