Skip to content
Closed
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
16 changes: 10 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
test:
machine:
image: ubuntu-2004:2022.07.1
image: ubuntu-2204:2024.01.2
steps:
- checkout

Expand Down Expand Up @@ -37,17 +37,21 @@ jobs:
docker-compose -f docker-compose.yml -f docker-compose.selenium.yml up -d
docker-compose -f docker-compose.yml -f docker-compose.selenium.yml exec django python manage.py collectstatic --noinput

- run: docker-compose exec django flake8 src/
# - run:
# name: Migrate
# command: |
# docker compose exec django ./manage.py migrate

- run:
name: pytest
command: docker-compose -f docker-compose.yml -f docker-compose.selenium.yml exec django py.test src/ -m "not e2e"

- run:
name: e2e tests
command: docker-compose -f docker-compose.yml -f docker-compose.selenium.yml exec django py.test src/tests/functional/ -m e2e
command: docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django py.test src/tests/functional/ -m e2e
no_output_timeout: 60m
# command: docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django py.test src/tests/functional/test_competitions.py

# - run:
# name: debug
# command: sleep 1800
- store_artifacts:
path: artifacts/

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.selenium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- 36475:36475

selenium:
image: selenium/standalone-firefox-debug:3.141.59
image: selenium/standalone-firefox:latest
volumes:
- ./src/tests/functional/test_files:/test_files/
- ./artifacts:/artifacts/:z
Expand Down
2 changes: 2 additions & 0 deletions src/apps/api/views/competitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def get_permissions(self):
def get_serializer_class(self):
if self.action == 'list':
return CompetitionSerializerSimple
if self.action == 'public':
return CompetitionSerializerSimple
elif self.action in ['get_phases', 'results', 'get_leaderboard_frontend_object']:
return LeaderboardPhaseSerializer
elif self.request.method == 'GET':
Expand Down
4 changes: 2 additions & 2 deletions src/templates/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ <h3 class="news-heading-title">{{post.title}}</h3>
</div>

<!-- Partners Section -->
<div class="segment-container ui segment full-width">
<!-- <div class="segment-container ui segment full-width">
<div class="ui header">Partners</div>
<div class="container-content" id="partners-row1">
<a href="https://www.universite-paris-saclay.fr/" target="_blank">
Expand Down Expand Up @@ -282,7 +282,7 @@ <h3 class="news-heading-title">{{post.title}}</h3>
</a>
</div>

</div>
</div> -->

</div>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion src/tests/functional/test_competitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def current_server_time_exists(self):

# Check that the text is a valid datetime by loading it with strptime.
# This will raise a ValueError if the format is incorrect.
assert datetime.strptime(text, '%B %d, %Y, %I:%M %p %Z')
assert datetime.strptime(text, '%B %d, %Y At %I:%M %p %Z')

def _upload_competition(self, competition_zip_path):
"""Creates a competition and waits for success message.
Expand Down