-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (51 loc) · 2.58 KB
/
integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Integration tests
on: [ pull_request ]
env:
EXERCISES_COMMIT: 4a2094135abe972eb38072be129171f685c18ec3
jobs:
# Runs the test suite in a slightly modified Docker image used by Dodona.
# This is the closest to actually running the production environment there is.
tests-dodona:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - run: docker build -t "local-image" -f ${{ github.workspace }}/.github/dodona-image.dockerfile --network=host .
# name: Build Dodona Docker image
# - run: docker run -v ${{ github.workspace }}:/github/workspace -e TESTED_SOURCE=/github/workspace local-image
# name: Run tests in Dodona Docker image
# Runs in the Docker image to check if the JS exercises still work.
javascript-dodona:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - run: |
# echo "$JAVASCRIPT_EXERCISES_KEY" > private
# chmod 0600 private
# GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking no" -i private' git clone git@github.ugent.be:Scriptingtalen/javascript-oefeningen.git
# rm private
# env:
# JAVASCRIPT_EXERCISES_KEY: ${{ secrets.JAVASCRIPT_EXERCISES_KEY }}
# - run: git checkout $EXERCISES_COMMIT
# working-directory: ./javascript-oefeningen
# - run: docker build -t "integration-image" -f ${{ github.workspace }}/.github/dodona-image-integration.dockerfile --network=host .
# name: Build Dodona Docker image
# - run: docker run -v ${{ github.workspace }}:/github/workspace -e TESTED_SOURCE=/github/workspace -e EXERCISE_REPO=/github/workspace/javascript-oefeningen integration-image
# name: Run integration tests in Dodona Docker image
# Runs in the repo to check if the JS exercises still work.
javascript-repository:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH
- run: |
echo "$JAVASCRIPT_EXERCISES_KEY" > private
chmod 0600 private
GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking no" -i private' git clone git@github.ugent.be:Scriptingtalen/javascript-oefeningen.git
rm private
env:
JAVASCRIPT_EXERCISES_KEY: ${{ secrets.JAVASCRIPT_EXERCISES_KEY }}
- run: git checkout $EXERCISES_COMMIT
working-directory: ./javascript-oefeningen
- run: nix develop -c bash -c "EXERCISE_REPO=./javascript-oefeningen poetry run pytest -x tests/test_integration_javascript.py"