Skip to content

Commit

Permalink
Merge #175 - Update workflows
Browse files Browse the repository at this point in the history
- Removed the migration as I am not convinced
- Added permissions on workflows
  • Loading branch information
williamdes committed Aug 20, 2024
2 parents 1c185eb + 5df691c commit 1a311fd
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 55 deletions.
23 changes: 0 additions & 23 deletions .github/stale.yml

This file was deleted.

13 changes: 7 additions & 6 deletions .github/workflows/monitoring.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: "Monitoring"

permissions:
contents: read

on:
workflow_dispatch:
schedule:
Expand All @@ -12,17 +15,15 @@ jobs:

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

- name: "Set up Python"
uses: "actions/setup-python@v2"
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: "Install requirements"
run: |
pip install beautifulsoup4
run: pip install beautifulsoup4

- name: "Check daily snapshots"
run: |
./monitoring/check_phpmyadmin_daily_snapshots.py
run: ./monitoring/check_phpmyadmin_daily_snapshots.py
65 changes: 39 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Run tests

permissions:
contents: read

on:
push:
pull_request:
Expand All @@ -8,29 +11,39 @@ on:
- master

jobs:
test-python:
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Use python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: pip install -r requirements-test.txt
- name: Run the migrations
run: ./manage.py migrate
- name: Check missing migrations
run: ./manage.py makemigrations --check
- name: Run python checks
run: ./manage.py check
- name: Run python tests and coverage
run: coverage run --source=. ./manage.py test
- name: Send coverage
uses: codecov/codecov-action@v3
test-python:
name: Test on Python ${{ matrix.python-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]

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

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

- name: Install requirements
run: pip install -r requirements-test.txt

- name: Run the migrations
run: ./manage.py migrate

- name: Check missing migrations
run: ./manage.py makemigrations --check

- name: Run Python checks
run: ./manage.py check

- name: Run Python tests and coverage
run: coverage run --source=. ./manage.py test

- name: Send coverage
uses: codecov/codecov-action@v3

0 comments on commit 1a311fd

Please sign in to comment.