Skip to content

Commit 1ff8973

Browse files
committed
chore: add GitHub Action to run tests automatically
1 parent 4acb0f2 commit 1ff8973

File tree

3 files changed

+45
-24
lines changed

3 files changed

+45
-24
lines changed

.github/workflows/test-academy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test Academy
2+
3+
on:
4+
push:
5+
branches: [ honzajavorek/lint-py ]
6+
schedule:
7+
- cron: "0 3 * * 1" # at 3am UTC on Mondays
8+
workflow_dispatch: # allows running this workflow manually from the Actions tab
9+
10+
jobs:
11+
test-exercises:
12+
name: Test Academy Exercises
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Source code
16+
uses: actions/checkout@v6
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
cache: npm
22+
cache-dependency-path: package-lock.json
23+
24+
- name: Setup Python
25+
uses: astral-sh/setup-uv@v7
26+
27+
- name: Install Bats
28+
run: npm install --only=dev
29+
30+
- name: Test
31+
run: npm run test:academy

package-lock.json

Lines changed: 11 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"lint:md:fix": "markdownlint '**/*.md' --fix",
4141
"lint:code": "eslint .",
4242
"lint:code:fix": "eslint . --fix",
43+
"test:academy": "bats --print-output-on-failure -r .",
4344
"postinstall": "patch-package",
4445
"postbuild": "node ./scripts/joinLlmsFiles.mjs && node ./scripts/indentLlmsFile.mjs"
4546
},
@@ -48,6 +49,7 @@
4849
"@apify/tsconfig": "^0.1.0",
4950
"@types/react": "^19.0.0",
5051
"babel-plugin-styled-components": "^2.1.4",
52+
"bats": "^1.13.0",
5153
"cross-env": "^10.0.0",
5254
"eslint": "^9.32.0",
5355
"eslint-plugin-react": "^7.37.5",
@@ -61,8 +63,8 @@
6163
"typescript-eslint": "^8.38.0"
6264
},
6365
"dependencies": {
64-
"@apify/ui-library": "^1.97.2",
6566
"@apify/ui-icons": "^1.19.0",
67+
"@apify/ui-library": "^1.97.2",
6668
"@docusaurus/core": "^3.8.1",
6769
"@docusaurus/faster": "^3.8.1",
6870
"@docusaurus/plugin-client-redirects": "^3.8.1",

0 commit comments

Comments
 (0)