Skip to content

Commit f5deee5

Browse files
masl2nhsd-david-wass
authored andcommitted
CI typecheck and lint
1 parent f75e48d commit f5deee5

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

.github/workflows/stage-1-commit.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: "Commit stage"
22

3+
permissions:
4+
contents: read
5+
36
on:
47
workflow_call:
58
inputs:

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"build": "JEKYLL_ENV=production bundle exec jekyll build --trace --config _config.yml,_config.version.yml",
1515
"debug": "JEKYLL_ENV=development BUNDLE_GEMFILE=Gemfile bundle exec jekyll serve --config _config.yml,_config.dev.yml,_config.version.yml --limit_posts 100 --trace",
1616
"generate-includes": "./generate-includes.sh",
17+
"lint": "echo \"Documentation module has no code to lint\"",
1718
"test:unit": "echo \"Documentation module has no unit tests\"",
1819
"typecheck": "echo \"Documentation module has no typescript to typecheck\""
1920
},

scripts/tests/lint.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
cd "$(git rev-parse --show-toplevel)"
6+
7+
# This file is for you! Edit it to call your unit test suite. Note that the same
8+
# file will be called if you run it locally as if you run it on CI.
9+
10+
# Replace the following line with something like:
11+
#
12+
# rails test:unit
13+
# python manage.py test
14+
# npm run test
15+
#
16+
# or whatever is appropriate to your project. You should *only* run your fast
17+
# tests from here. If you want to run other test suites, see the predefined
18+
# tasks in scripts/test.mk.
19+
20+
# run tests
21+
npm ci
22+
npm run lint --workspaces

scripts/tests/typecheck.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
cd "$(git rev-parse --show-toplevel)"
6+
7+
# This file is for you! Edit it to call your unit test suite. Note that the same
8+
# file will be called if you run it locally as if you run it on CI.
9+
10+
# Replace the following line with something like:
11+
#
12+
# rails test:unit
13+
# python manage.py test
14+
# npm run test
15+
#
16+
# or whatever is appropriate to your project. You should *only* run your fast
17+
# tests from here. If you want to run other test suites, see the predefined
18+
# tasks in scripts/test.mk.
19+
20+
# run tests
21+
npm ci
22+
npm run typecheck --workspaces

0 commit comments

Comments
 (0)