Skip to content

Commit 6cf8acc

Browse files
authored
Create ci.yml
1 parent 150568a commit 6cf8acc

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Test judge0-py
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: "3.9"
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install pipenv
25+
pipenv install --dev
26+
- name: Lint with flake8
27+
run: |
28+
# stop the build if there are Python syntax errors or undefined names
29+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
30+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
31+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
32+
- name: Test with pytest
33+
env: # Add necessary api keys as env variables.
34+
ATD_API_KEY: ${{ secrets.ATD_API_KEY }}
35+
RAPID_API_KEY: ${{ secrets.RAPID_API_KEY }}
36+
SULU_API_KEY: ${{ secrets.SULU_API_KEY }}
37+
run: |
38+
pytest

0 commit comments

Comments
 (0)