generated from nyuoss/sylveon-python-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (44 loc) · 1.5 KB
/
main.yaml
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
55
name: Deploy API and Automate Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
- name: Install PDM dependencies and initialize project repository
run: pdm install
- name: Activate Virtual Environment
run: pdm venv activate
- name: Install pip and other dependencies
run: |
python -m pip install --upgrade pip
python -m pip install types-beautifulsoup4 types-requests
pip install -r requirements.txt
- name: Format code
run: pdm format
# - name: Lint code
# run: pdm lint
- name: Start project
run: pdm run start
- name: Run Tests
run: pdm test
env:
GRADESCOPE_CI_STUDENT_EMAIL: ${{ secrets.GRADESCOPE_CI_STUDENT_EMAIL }}
GRADESCOPE_CI_STUDENT_PASSWORD: ${{ secrets.GRADESCOPE_CI_STUDENT_PASSWORD }}
GRADESCOPE_CI_INSTRUCTOR_EMAIL: ${{ secrets.GRADESCOPE_CI_INSTRUCTOR_EMAIL }}
GRADESCOPE_CI_INSTRUCTOR_PASSWORD: ${{ secrets.GRADESCOPE_CI_INSTRUCTOR_PASSWORD }}
GRADESCOPE_CI_TA_EMAIL: ${{ secrets.GRADESCOPE_CI_TA_EMAIL }}
GRADESCOPE_CI_TA_PASSWORD: ${{ secrets.GRADESCOPE_CI_TA_PASSWORD }}