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": {