From 9069de76af7dbd8b5dea233bbc0834e134e80067 Mon Sep 17 00:00:00 2001 From: Refringe Date: Wed, 10 Apr 2024 15:25:41 -0400 Subject: [PATCH 1/3] Run Tests Workflow This is a Gitea workflow that runs the test suite after a commit or PR. --- .gitea/workflows/run-tests.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/run-tests.yaml diff --git a/.gitea/workflows/run-tests.yaml b/.gitea/workflows/run-tests.yaml new file mode 100644 index 00000000..05e654e2 --- /dev/null +++ b/.gitea/workflows/run-tests.yaml @@ -0,0 +1,26 @@ +name: Run Tests + +on: + push: + branches: '*' + pull_request: + branches: '*' + +jobs: + trigger-main-build: + runs-on: ubuntu-latest + container: + image: node:20.11.1-alpine + steps: + - uses: actions/checkout@v3 + with: + path: 'server' + fetch-depth: 1 + + - name: Install Dependencies + working-directory: server + run: npm ci + + - name: Run Tests + working-directory: server + run: npm run test From 94b7d31bc8537e868c911406b520a7f98013f189 Mon Sep 17 00:00:00 2001 From: Refringe Date: Wed, 10 Apr 2024 15:32:39 -0400 Subject: [PATCH 2/3] Fixes Tests Workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently we need node to run node. 🙄 --- .gitea/workflows/run-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/run-tests.yaml b/.gitea/workflows/run-tests.yaml index 05e654e2..0b0a2aec 100644 --- a/.gitea/workflows/run-tests.yaml +++ b/.gitea/workflows/run-tests.yaml @@ -10,7 +10,7 @@ jobs: trigger-main-build: runs-on: ubuntu-latest container: - image: node:20.11.1-alpine + image: node:20.11.1-bookworm steps: - uses: actions/checkout@v3 with: From a76dfcc0296924d5a53b0fcc4076c4d968c0dea4 Mon Sep 17 00:00:00 2001 From: Refringe Date: Wed, 10 Apr 2024 15:37:09 -0400 Subject: [PATCH 3/3] Fixes Tests Workflow For Real Can't use `npm ci`. Forgot that we removed the package lock file. Also updated the working directory path. --- .gitea/workflows/run-tests.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/run-tests.yaml b/.gitea/workflows/run-tests.yaml index 0b0a2aec..502dc88c 100644 --- a/.gitea/workflows/run-tests.yaml +++ b/.gitea/workflows/run-tests.yaml @@ -14,13 +14,12 @@ jobs: steps: - uses: actions/checkout@v3 with: - path: 'server' fetch-depth: 1 - name: Install Dependencies - working-directory: server - run: npm ci + working-directory: /workspace/SPT-AKI/Server/project + run: npm install - name: Run Tests - working-directory: server + working-directory: /workspace/SPT-AKI/Server/project run: npm run test