Skip to content

Fixed some bugs and wrote another test for io #1186

Fixed some bugs and wrote another test for io

Fixed some bugs and wrote another test for io #1186

Workflow file for this run

name: CI
on:
push:
pull_request_target:
types: [labeled]
env:
EXERCISES_COMMIT: 31ef0f174efaeba2a37415115e7fd0332573d9b2
jobs:
build_devcontainer:
if: ${{ github.event.action != 'labeled' || (github.event.action == 'labeled' && github.event.label.name == 'run tests') }}
uses: ./.github/workflows/build_devcontainer.yml
secrets: inherit
test:
needs: [build_devcontainer]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Run tests in container
uses: devcontainers/ci@v0.3
with:
imageName: dodona/dodona-tested
imageTag: dev
push: never
runCmd: pytest -n auto --cov=tested --cov-report=xml tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./result/coverage.xml
lint:
needs: [build_devcontainer]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Run isort
uses: devcontainers/ci@v0.3
with:
imageName: dodona/dodona-tested
imageTag: dev
push: never
runCmd: isort --check-only --diff ./tested ./tests
- name: Run black
uses: devcontainers/ci@v0.3
with:
imageName: dodona/dodona-tested
imageTag: dev
push: never
runCmd: black --check ./tested ./tests
types:
needs: [build_devcontainer]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Run pyright
uses: devcontainers/ci@v0.3
with:
imageName: dodona/dodona-tested
imageTag: dev
push: never
runCmd: pyright ./tested ./tests
# check if the JS exercises still work.
javascript-dodona:
needs: [build_devcontainer]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- 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
- name: Run tests in container
uses: devcontainers/ci@v0.3
env:
EXERCISE_REPO: javascript-oefeningen
with:
imageName: dodona/dodona-tested
imageTag: dev
push: never
runCmd: pytest -x -n auto tests/test_integration_javascript.py
env: |
EXERCISE_REPO