mirror of
https://github.com/modelec/modelec.club.git
synced 2026-01-18 16:37:30 +01:00
Update unit-test
This commit is contained in:
41
.github/workflows/unit-test.yml
vendored
41
.github/workflows/unit-test.yml
vendored
@@ -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
|
||||
Reference in New Issue
Block a user