Skip to content

Commit

Permalink
Action speedup (#467)
Browse files Browse the repository at this point in the history
* Make github actions tests run in parallel

* Update to actions/upload-artifact@v4 in cypress action

* Make cypress action actually wait for migrations

* Remove old manual pip cache from github actions

* Remove unnecessary? free pascal compiler from actions
  • Loading branch information
stopnoanime authored Feb 26, 2025
1 parent 2f1b436 commit 7413a75
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 40 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ jobs:
python easy_toolbox.py up --no-input
- name: Wait for migrations
uses: whatnick/wait-action@master
with:
time: 30s
run: |
docker compose logs -f | grep -m 1 "Init Finished"
- name: Apply CyPress settings
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y curl libpq-dev libdb-dev
sudo apt-get install -y fp-compiler fp-units-base fp-units-math
sudo apt-get install -y texlive-latex-base texlive-lang-polish texlive-lang-czechslovak texlive-latex-extra texlive-pstricks texlive-luatex
- name: Install pip dependencies
Expand All @@ -32,4 +31,4 @@ jobs:
- name: Run tests
run: |
./test.sh --cov-report term --cov-report xml:coverage.xml --cov=oioioi --migrations --runslow -v
./test.sh -n auto --cov-report term --cov-report xml:coverage.xml --cov=oioioi --migrations --runslow -v
12 changes: 1 addition & 11 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,8 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y curl libpq-dev libdb-dev
sudo apt-get install -y fp-compiler fp-units-base fp-units-math
sudo apt-get install -y texlive-latex-base texlive-lang-polish texlive-latex-extra texlive-pstricks texlive-luatex
- name: Cache restore pip
id: cache-pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements*.txt') }}
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
Expand All @@ -43,4 +33,4 @@ jobs:
- name: Run tests
run: |
./test.sh --migrations
./test.sh -n auto --migrations
12 changes: 1 addition & 11 deletions .github/workflows/translations-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y curl libpq-dev libdb-dev gettext
sudo apt-get install -y fp-compiler fp-units-base fp-units-math
- name: Cache restore pip
id: cache-pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements*.txt') }}
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/translations-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y curl libpq-dev libdb-dev gettext
sudo apt-get install -y fp-compiler fp-units-base fp-units-math
- name: Cache restore pip
id: cache-pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements*.txt') }}
- name: Install pip dependencies
run: |
Expand Down
6 changes: 4 additions & 2 deletions oioioi/contests/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2173,11 +2173,13 @@ def setUp(self):
'oioioi.programs.controllers.ProgrammingContestController'
)
self.contest.save()
super().setUp()

def test_dashboard(self):
unregister_contest_dashboard_view(simpleui_contest_dashboard)
unregister_contest_dashboard_view(teachers_contest_dashboard)

super().setUp()

def test_dashboard(self):
self.assertTrue(self.client.login(username='test_contest_basicadmin'))
url = reverse('default_contest_view', kwargs={'contest_id': 'c'})
response = self.client.get(url, follow=True)
Expand Down
4 changes: 3 additions & 1 deletion oioioi_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ if [ "$1" == "--dev" ]; then
./manage.py loaddata ../oioioi/extra/dbdata/default_admin.json
fi

exec ./manage.py supervisor --logfile=/sio2/deployment/logs/supervisor.log
echo "Init Finished"

exec ./manage.py supervisor --logfile=/sio2/deployment/logs/supervisor.log

0 comments on commit 7413a75

Please sign in to comment.