From 6f1df1b7248dca3d701bb724a23972a88cb4824f Mon Sep 17 00:00:00 2001 From: Ethan Wu Date: Sun, 9 Aug 2020 15:04:14 -0400 Subject: [PATCH] fix: fix CI jobs harderer Always run codecov collect step if the tests ran (regardless of success / failure), and run client tests too. --- .github/workflows/ci.yml | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 498a08a58..7c4e5321c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,10 +90,12 @@ jobs: psql "$RCTF_DATABASE_URL" -c $'INSERT INTO challenges (id, data) VALUES (\'id\', \'{"flag": "flag{good_flag}", "name": "name", "files": [], "author": "author", "points": {"max": 500, "min": 100}, "category": "category", "description": "description", "tiebreakEligible": true}\')' - name: Run tests + id: testrun run: | yarn test:report --ci --forceExit - name: Upload coverage reports + if: ${{ (steps.testrun.outcome == 'success') || (steps.testrun.outcome == 'failure') }} uses: codecov/codecov-action@v1 docker-build: diff --git a/package.json b/package.json index 7a037cd38..d24a40977 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "test:client": "cd client && jest", "test:server": "jest -c server/jest.config.js", "test": "sh -c 'yarn test:client \"$@\" ; yarn test:server \"$@\"' test", - "test:report": "yarn test:server --coverage", + "test:report": "yarn test --coverage", "copy-static": "cpy --cwd=server/src \"**/*\" \"!**/*.{j,t}s\" ../../dist/server --parents && cpy migrations dist/ --parents" }, "nodemonConfig": {