Skip to content

Commit be84ead

Browse files
Merge branch 'main' into 95-return-tree-like-report-structure
2 parents e0f9547 + e13fd9f commit be84ead

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2714
-961
lines changed

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to VPS
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Triggers on push to main branch
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Deploy via SSH
13+
uses: appleboy/ssh-action@v1.0.3
14+
with:
15+
host: ${{ secrets.SERVER_HOST }}
16+
username: ${{ secrets.SERVER_USER }}
17+
key: ${{ secrets.SSH_PRIVATE_KEY }}
18+
port: 22
19+
script: |
20+
# 1. Navigate to project folder
21+
cd ~/autograder
22+
23+
# 2. Pull latest changes
24+
git fetch --all
25+
git reset --hard origin/main
26+
27+
# 3. Update Python dependencies
28+
source venv/bin/activate
29+
pip install -r requirements.txt
30+
31+
# 4. Restart the specific PM2 process
32+
pm2 restart autograder-api
33+
34+
# Optional: Save just in case
35+
pm2 save

.github/workflows/pylint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Pylint
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.13"]
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install pylint
26+
27+
- name: Get modified Python files
28+
id: changed-files
29+
run: |
30+
FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- '*.py' | tr '\n' ' ')
31+
echo "files=$FILES" >> $GITHUB_OUTPUT
32+
33+
- name: Analysing the code with pylint
34+
if: steps.changed-files.outputs.files != ''
35+
run: |
36+
pylint ${{ steps.changed-files.outputs.files }}

0 commit comments

Comments
 (0)