-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yamls suck
- Loading branch information
Showing
1 changed file
with
40 additions
and
32 deletions.
There are no files selected for viewing
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
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 |