mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-02 12:00:10 +08:00
Add test step in pr-check action (#2942) Bruception
* Add test step in pr-check action * Add jest action * Specify wd * Remove action * Remove test * Add anti-cheat check
This commit is contained in:
parent
afd288a717
commit
8095dd6bfc
4 changed files with 22 additions and 7 deletions
14
.github/workflows/pr-check.yml
vendored
14
.github/workflows/pr-check.yml
vendored
|
@ -6,10 +6,12 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
checks: write
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
|
@ -42,9 +44,9 @@ jobs:
|
|||
working-directory: ./frontend/src/ts/constants
|
||||
run: mv ./firebase-config-example.ts ./firebase-config-live.ts
|
||||
|
||||
# - name: Check Anti-cheat
|
||||
# if: steps.filter.outputs.anti-cheat == 'true'
|
||||
# run: exit 1
|
||||
- name: Check Anti-cheat
|
||||
if: steps.filter.outputs.anti-cheat == 'true'
|
||||
run: exit 1
|
||||
|
||||
- name: Cache node modules
|
||||
if: steps.filter.outputs.changes != '[]'
|
||||
|
@ -93,6 +95,10 @@ jobs:
|
|||
if: steps.filter.outputs.ts-be == 'true'
|
||||
run: npm run pr-check-build-be
|
||||
|
||||
- name: Test backend
|
||||
if: steps.filter.outputs.ts-be == 'true'
|
||||
run: npm run test-backend
|
||||
|
||||
- name: Run webpack
|
||||
if: steps.filter.outputs.ts-scss-fe == 'true'
|
||||
run: npm run pr-check-ts
|
||||
|
|
|
@ -4,4 +4,12 @@ export default {
|
|||
preset: "@shelf/jest-mongodb",
|
||||
transform: tsjPreset.transform,
|
||||
setupFilesAfterEnv: ["<rootDir>/setup-tests.ts"],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
branches: 0,
|
||||
functions: 0,
|
||||
lines: 0,
|
||||
statements: 0,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
"watch": "tsc --build --watch",
|
||||
"clean": "tsc --build --clean",
|
||||
"start": "npm run build && node ./build/server.js",
|
||||
"test": "jest",
|
||||
"dev": "ts-node-dev ./src/server.ts -- --inspect --transpileOnly"
|
||||
"test": "jest --verbose --collect-coverage",
|
||||
"dev": "ts-node-dev server.ts -- --inspect --transpileOnly"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.13.2",
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
"pr-check-other-json": "cd frontend && npx gulp pr-check-other-json",
|
||||
"pr-check-ts": "cd frontend && npx gulp pr-check-ts",
|
||||
"pr-check-build-be": "cd backend && npm run build",
|
||||
"docker": "cd backend && docker-compose up"
|
||||
"docker": "cd backend && docker-compose up",
|
||||
"test-backend": "cd backend && npm run test"
|
||||
},
|
||||
"engines": {
|
||||
"npm": "8.1.2"
|
||||
|
|
Loading…
Reference in a new issue