Skip to content

Merge pull request #1070 from TMS-Uni-Stuttgart/update-gh-actions-nod… #5658

Merge pull request #1070 from TMS-Uni-Stuttgart/update-gh-actions-nod…

Merge pull request #1070 from TMS-Uni-Stuttgart/update-gh-actions-nod… #5658

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
- stable
pull_request:
jobs:
test-server:
name: Serverside unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4 # If you're using actions/checkout@v4 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
- name: Start SQL Docker container
uses: mirromutth/[email protected]
with:
host port: 3306 # Optional, default value is 3306. The port of host
container port: 3306 # Optional, default value is 3306. The port of container
character set server: 'utf8' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld
collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
mysql version: '8.0' # Optional, default value is "latest". The version of the MySQL
mysql database: 'tms-testing-db' # Optional, default value is "test". The specified database which will be created
mysql root password: 'some-password' # Required if "mysql user" is empty, default is empty. The root superuser password
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Enable Corepack
run: corepack enable
- name: Prepare pnpm using Corepack
run: corepack prepare pnpm
- name: Install node packages
run: |
pnpm install --frozen-lockfile
env:
CI: true
- name: Run tests on server
working-directory: server/
run: |
pnpm test
env:
CI: true