You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Custom script for checking the linting and formatting being in place
50
64
run: npm run lint
51
65
working-directory: ./frontend
52
-
# Run test cases and this could ensure minimum coverage as well if set
53
-
# This section should be un-commented when our frontend implements unit testing
54
-
# - name: Execute test cases
55
-
# run: npm run test
56
-
# working-directory: ./frontend
66
+
- name: Check TypeScript types
67
+
run: npx tsc --noEmit
68
+
working-directory: ./frontend
69
+
- name: Verify generated types are up-to-date
70
+
run: |
71
+
# Run the type generation script (conda environment 'galaxy' is already activated)
72
+
./generate_types.sh
73
+
# Check if any files were modified
74
+
git diff --exit-code src/api/_autogen/ || (echo "ERROR: Generated TypeScript types are out of date. Please run ./generate_types.sh and commit the changes." && exit 1)
75
+
working-directory: ./frontend
57
76
lint:
58
77
name: Linter (pre-commit)
59
78
runs-on: ubuntu-latest
60
79
permissions:
61
80
contents: read
62
-
id-token: write
63
81
steps:
64
82
- name: Checkout branch
65
83
uses: actions/checkout@v3.1.0
@@ -72,7 +90,28 @@ jobs:
72
90
uses: conda-incubator/setup-miniconda@v2.2.0
73
91
with:
74
92
environment-file: environment-dev.yml
93
+
activate-environment: galaxy
75
94
use-only-tar-bz2: true
95
+
- name: Set up NodeJS environment
96
+
uses: actions/setup-node@v3
97
+
with:
98
+
node-version: '20.12.2'
99
+
- name: Cache node modules
100
+
id: cache-npm
101
+
uses: actions/cache@v3
102
+
env:
103
+
cache-name: cache-node-modules
104
+
with:
105
+
# npm cache files are stored in `~/.npm` on Linux/macOS
0 commit comments