diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98f8b6e9f7..d82b91cb7e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,24 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 - - # extract branch name - - name: Extract branch name - if: github.event_name != 'pull_request' - shell: bash - run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - id: extract_branch - - # extract branch name on pull request - - name: Print branch name - if: github.event_name == 'pull_request' - run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV + node-version: '18' - name: setup environment and execute mocha tests - run: bash scripts/unitTest.sh + run: npm ci && npm run build && npm run mocha diff --git a/package.json b/package.json index 91c4b5322c..e811037ffc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "name": "schulcloud-client", - "private": true, "scripts": { "start": "node --unhandled-rejections=warn ./bin/www", "watch": "nodemon --config nodemon.json", @@ -15,7 +14,7 @@ }, "engines": { "node": "18", - "npm": "9" + "npm": ">=9" }, "lint-staged": { "static/images/**/*.{png,jpeg,jpg,gif,svg}": [ diff --git a/scripts/unitTest.sh b/scripts/unitTest.sh deleted file mode 100644 index 710aeb5abc..0000000000 --- a/scripts/unitTest.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -npm ci -npm run build -npm run mocha