-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove separate pytest-mariadb and pytest-sqlite steps from CI
They are now both handled in the "test" step.
- Loading branch information
Showing
1 changed file
with
3 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ concurrency: | |
|
||
jobs: | ||
|
||
tests: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -71,110 +71,15 @@ jobs: | |
- name: Run tests | ||
run: coverage run -p -m pytest | ||
|
||
|
||
pytest-mariadb: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
# While we are only running for a single version | ||
# ahead of planned upgrades we can add versions as | ||
# needed | ||
python-version: [3.8] | ||
mariadb-version: ["10.4", "10.5"] | ||
|
||
services: | ||
mysql: | ||
image: mariadb:${{ matrix.mariadb-version }} | ||
ports: | ||
- 3306:3306 | ||
env: | ||
MYSQL_ROOT_PASSWORD: root | ||
|
||
env: | ||
# mysql://user:password@host:port/database | ||
DATABASE_URL: "mysql://root:[email protected]:3306/mysql" | ||
# We can set this to an empty string, since we'll never make an API call. | ||
ANVIL_API_SERVICE_ACCOUNT_FILE: foo | ||
|
||
|
||
steps: | ||
|
||
- name: Checkout Code Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: pip | ||
cache-dependency-path: | | ||
requirements/requirements.txt | ||
requirements/test-requirements.txt | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pip-tools | ||
pip-sync requirements/requirements.txt requirements/test-requirements.txt | ||
- name: Collect staticfiles | ||
run: python manage.py collectstatic --noinput --settings=config.settings.test | ||
|
||
- name: Run tests | ||
run: coverage run -p -m pytest | ||
env: | ||
# We can set this to an empty string, since we'll never make an API call. | ||
ANVIL_API_SERVICE_ACCOUNT_FILE: foo | ||
|
||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-data-mysql-${{ strategy.job-index }} | ||
path: .coverage.* | ||
|
||
pytest-sqlite: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
# We can set this to an empty string, since we'll never make an API call. | ||
ANVIL_API_SERVICE_ACCOUNT_FILE: foo | ||
|
||
steps: | ||
- name: Checkout Code Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
cache: pip | ||
cache-dependency-path: | | ||
requirements/requirements.txt | ||
requirements/test-requirements.txt | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pip-tools | ||
pip-sync requirements/requirements.txt requirements/test-requirements.txt | ||
- name: Collect staticfiles | ||
run: python manage.py collectstatic --noinput --settings=config.settings.test | ||
|
||
- name: Run tests | ||
run: coverage run -p -m pytest | ||
|
||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-data-sqlite-${{ strategy.job-index }} | ||
name: coverage-data-${{ strategy.job-index }} | ||
path: .coverage.* | ||
|
||
coverage: | ||
needs: | ||
- pytest-mariadb | ||
- pytest-sqlite | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
|