feat: Add basic full tests with actions
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
This commit is contained in:
parent
cd5993c04c
commit
3669078563
@ -7,3 +7,8 @@ charset = utf-8
|
|||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
|
|
||||||
|
# Yaml Standard
|
||||||
|
[*.{yaml,yml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
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
|
@ -37,6 +37,7 @@ FROM node:20-slim as PROD_IMAGE
|
|||||||
# inform software to be in production
|
# inform software to be in production
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV HOST=0.0.0.0
|
ENV HOST=0.0.0.0
|
||||||
|
ENV ASTRO_TELEMETRY_DISABLED=true
|
||||||
|
|
||||||
# Download & Install Slic3r
|
# Download & Install Slic3r
|
||||||
# RUN apt-get update \
|
# RUN apt-get update \
|
||||||
|
1
cypress/.gitignore
vendored
1
cypress/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
videos
|
videos
|
||||||
|
screenshots
|
||||||
|
@ -7,9 +7,13 @@
|
|||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"start": "node ./dist/server/entry.mjs",
|
"start": "node ./dist/server/entry.mjs",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
|
||||||
"astro": "astro",
|
"astro": "astro",
|
||||||
"test": "vitest --coverage"
|
"check": "npm run check:astro && npm run check:typescript",
|
||||||
|
"check:astro": "astro check",
|
||||||
|
"check:typescript": "tsc --noEmit",
|
||||||
|
"test": "npm run test:unit && npm run test:integ",
|
||||||
|
"test:unit": "vitest --coverage",
|
||||||
|
"test:integ": "cypress run"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/node": "^5",
|
"@astrojs/node": "^5",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user