Updated production site deployment workflow #901
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
# 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 | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Server Integration Tests | |
on: | |
push: | |
branches: | |
- main | |
- staging | |
pull_request: | |
branches: | |
- main | |
- staging | |
env: | |
MODELICA_DEPENDENCIES: ../dependencies | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: server | |
strategy: | |
matrix: | |
node-version: [18.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: server/package-lock.json | |
- name: Install Modelica dependencies | |
run: npm run install-modelica-deps | |
- name: Install Python dependencies | |
run: npm run install-python-deps | |
- name: Install NPM packages | |
run: npm ci | |
- name: Run tests | |
run: | | |
npm run start & | |
sleep 5 # wait for server to start | |
npm run test:ci |