feat: Add basic full tests with actions
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
This commit is contained in:
47
.github/workflows/build_and_check.yml
vendored
Normal file
47
.github/workflows/build_and_check.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
name: Build, check & Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
install:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
build:
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
check:
|
||||
needs: 'install'
|
||||
steps:
|
||||
- name: Check
|
||||
run: |
|
||||
npm run start &
|
||||
wait 10
|
||||
npm run check
|
||||
|
||||
|
||||
test:
|
||||
needs: 'build'
|
||||
steps:
|
||||
- name: Test
|
||||
run : |
|
||||
npm run start &
|
||||
sleep 10
|
||||
npm run test
|
Reference in New Issue
Block a user