Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action speedup #467

Merged
merged 5 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 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 All @@ -45,7 +44,7 @@ jobs:
./test_cypress.sh

- name: Upload screenshots
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
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