Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
20 changes: 0 additions & 20 deletions .github/workflows/ci-docker.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docker image on GHCR
name: Publish Docker image on GitHub Container Registry
# https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions

on:
Expand All @@ -16,7 +16,7 @@ env:

jobs:
build-and-push-image:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build-and-publish:
name: Build and publish library to PyPI
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build-and-publish:
name: Build and publish library to PyPI
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/run-unit-tests-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Run unit tests on Docker container

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-24.04
env:
FROM_DOCKER_IMAGE: "1"

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Generate the .env file and the SECRET_KEY
run: make envfile

- name: Run tests
run: docker compose run web python ./manage.py test --verbosity=2 --noinput
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test CI
name: Run unit tests

on: [push, pull_request]

Expand All @@ -10,58 +10,58 @@

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

services:
postgres:
image: postgres:13
env:
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_INITDB_ARGS: ${{ env.POSTGRES_INITDB_ARGS }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

strategy:
max-parallel: 4
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install universal ctags and xgettext
run: |
sudo apt-get update
sudo apt-get install -y universal-ctags gettext

- name: Install dependencies
run: make dev envfile

- name: Validate code format
run: make check

- name: Check Django deployment settings
run: make check-deploy

- name: Build the documentation
run: make docs

- name: Run tests
run: .venv/bin/python manage.py test --verbosity=2 --noinput
env:
SCANCODEIO_DB_NAME: ${{ env.POSTGRES_DB }}
SCANCODEIO_DB_USER: ${{ env.POSTGRES_USER }}
SCANCODEIO_DB_PASSWORD: ${{ env.POSTGRES_PASSWORD }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Loading