-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.25 KB
/
test.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
name: Test judge0-python
on:
workflow_dispatch:
push:
branches: ["master"]
paths: ["src/**", "tests/**"]
pull_request:
branches: ["master"]
paths: ["src/**", "tests/**"]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install -e .[test]
- name: Test with pytest
env: # Add necessary api keys as env variables.
JUDGE0_ATD_API_KEY: ${{ secrets.JUDGE0_ATD_API_KEY }}
JUDGE0_RAPID_API_KEY: ${{ secrets.JUDGE0_RAPID_API_KEY }}
JUDGE0_SULU_API_KEY: ${{ secrets.JUDGE0_SULU_API_KEY }}
JUDGE0_CE_AUTH_HEADERS: ${{ secrets.JUDGE0_CE_AUTH_HEADERS }}
JUDGE0_EXTRA_CE_AUTH_HEADERS: ${{ secrets.JUDGE0_EXTRA_CE_AUTH_HEADERS }}
JUDGE0_CE_ENDPOINT: ${{ secrets.JUDGE0_CE_ENDPOINT }}
JUDGE0_EXTRA_CE_ENDPOINT: ${{ secrets.JUDGE0_EXTRA_CE_ENDPOINT }}
run: |
source venv/bin/activate
pytest tests