Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependencies #511

Merged
merged 22 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dodona-image.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Inherit from the Docker image for Dodona.
FROM dodona/dodona-tested

# Go back to being root.
USER root
WORKDIR /

# Install some additional dependencies needed for testing.
RUN pip install --no-cache-dir --upgrade pytest pytest-mock pytest-xdist

# The source of the judge is available in TESTED_SOURCE.
CMD pytest -n auto ${TESTED_SOURCE}/tests/
72 changes: 16 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,29 @@ on: [ push ]

jobs:
test:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11.2
cache: 'pipenv'
- run: pip install pipenv
- run: pipenv install --dev
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- uses: haskell/actions/setup@v2
with:
ghc-version: '9.2'
cabal-version: '3.6'
- uses: actions/cache@v3
name: Cache cabal
with:
path: |
~/.cabal
~/.ghc
dist-newstyle
key: ${{ runner.os }}-ghc-9.2.1-20220111
restore-keys: |
${{ runner.os }}-ghc-9.2.1-
- run: cabal v1-install aeson
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install [email protected]
- run: npm install -g [email protected]
- run: sudo apt -y install hlint cppcheck shellcheck checkstyle
- run: curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.48.2/ktlint && chmod a+x ktlint
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH
- run: pipenv run pytest -n auto --cov=tested --cov-report=xml tests/
- run: nix flake check --print-build-logs
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: isort/[email protected]
with:
sortPaths: "./tested ./tests"
- uses: psf/black@stable
with:
version: "~= 23.0"
src: "./tested ./tests"
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH
- run: nix develop .#format -c poetry run isort --check-only ./tested ./tests
- run: nix develop .#format -c poetry run black --check ./tested ./tests
types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11.2
cache: 'pipenv'
- run: pip install pipenv
- run: pipenv install --dev
- run: echo "$(pipenv --venv)/bin" >> $GITHUB_PATH
- uses: jakebailey/pyright-action@v1
with:
version: '1.1.316'
warnings: true
working-directory: tested/
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: echo "${GITHUB_WORKSPACE}" >> $GITHUB_PATH
- run: nix develop .#types -c pyright ./tested
15 changes: 15 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Integration tests

on: [ push ]

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.
dodona-docker:
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ ipython_config.py
generated/
venv/
venv-*/
.venv/
node_modules/
30 changes: 0 additions & 30 deletions Pipfile

This file was deleted.

Loading
Loading