Update unit-test

This commit is contained in:
2024-10-15 12:55:31 +02:00
parent 1b77e9f8d8
commit c67485e2ec

View File

@@ -6,9 +6,8 @@ on:
- '**'
jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest
environment: recette
steps:
- name: Checkout code
@@ -21,10 +20,38 @@ jobs:
with:
node-version: '20'
- name: Install dependencies and build
run: |
npm ci
npm run build
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: ./dist
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: ./dist
- name: Install http-server
run: npm install --save-dev http-server
@@ -55,4 +82,4 @@ jobs:
port: ${{ secrets.SERVER_PORT }}
uploads: |
./dist => /var/www/modelec.club
dry-run: true
dry-run: true