2024-02-16 14:20:35 -05:00
|
|
|
name: Test
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
DJANGO_SETTINGS_MODULE: cmsmanage.settings.ci
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: catthehacker/ubuntu:act-latest
|
|
|
|
services:
|
|
|
|
mariadb:
|
|
|
|
image: mariadb:latest
|
|
|
|
env:
|
|
|
|
MARIADB_ROOT_PASSWORD: whatever
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup PDM
|
|
|
|
uses: pdm-project/setup-pdm@v4
|
|
|
|
with:
|
|
|
|
cache: true
|
|
|
|
python-version: ~3.11
|
2024-02-17 13:47:27 -05:00
|
|
|
token: ""
|
2024-02-16 14:20:35 -05:00
|
|
|
- name: Install apt dependencies
|
|
|
|
run: >-
|
|
|
|
sudo apt-get update &&
|
|
|
|
sudo apt-get -y install build-essential python3-dev libldap2-dev libsasl2-dev mariadb-client
|
|
|
|
- name: Install python dependencies
|
2024-02-17 13:56:59 -05:00
|
|
|
run: pdm sync -d
|
2024-02-16 14:20:35 -05:00
|
|
|
- name: Run tests
|
2024-04-18 11:43:02 -04:00
|
|
|
run: pdm run -v ./manage.py test
|