Skip to content

Commit

Permalink
Update runner to ubuntu-24.04 in GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cuu508 committed Feb 12, 2025
1 parent 3c5c5f5 commit 8f6dc2d
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 97 deletions.
55 changes: 27 additions & 28 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
name: Coverage

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:

runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install apprise braintree coverage coveralls minio
- name: Run Tests
env:
SECRET_KEY: dummy-key
run: coverage run --omit=*/tests/*,*/migrations/* --source=hc manage.py test
- name: Coveralls
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install apprise braintree coverage coveralls minio
- name: Run Tests
env:
SECRET_KEY: dummy-key
run: coverage run --omit=*/tests/*,*/migrations/* --source=hc manage.py test
- name: Coveralls
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 23 additions & 23 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Mypy

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
main:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install apprise braintree minio
pip install mypy==1.13.0 django-stubs types-braintree types-pycurl==7.45.2.20240311 types-Markdown types-pygments
touch hc/local_settings.py
- name: Run Mypy
run: mypy --strict hc
main:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install apprise braintree minio
pip install mypy==1.13.0 django-stubs types-braintree types-pycurl==7.45.2.20240311 types-Markdown types-pygments
touch hc/local_settings.py
- name: Run Mypy
run: mypy --strict hc
91 changes: 45 additions & 46 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,51 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
db: [sqlite, postgres, mysql]
python-version: ["3.10", "3.11", "3.12"]
include:
- db: postgres
db_user: runner
db_password: ""
- db: mysql
db_user: root
db_password: root

runs-on: ubuntu-20.04
strategy:
matrix:
db: [sqlite, postgres, mysql]
python-version: ["3.10", "3.11", "3.12"]
include:
- db: postgres
db_user: runner
db_password: ''
- db: mysql
db_user: root
db_password: root

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Start MySQL
if: matrix.db == 'mysql'
run: sudo systemctl start mysql.service
- name: Start PostgreSQL
if: matrix.db == 'postgres'
run: |
sudo systemctl start postgresql.service
sudo -u postgres createuser -s runner
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install apprise minio mysqlclient
- name: Run Tests
env:
DB: ${{ matrix.db }}
DB_USER: ${{ matrix.db_user }}
DB_PASSWORD: ${{ matrix.db_password }}
SECRET_KEY: dummy-key
run: python manage.py test
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Start MySQL
if: matrix.db == 'mysql'
run: sudo systemctl start mysql.service
- name: Start PostgreSQL
if: matrix.db == 'postgres'
run: |
sudo systemctl start postgresql.service
sudo -u postgres createuser -s runner
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install apprise minio mysqlclient
- name: Run Tests
env:
DB: ${{ matrix.db }}
DB_USER: ${{ matrix.db_user }}
DB_PASSWORD: ${{ matrix.db_password }}
SECRET_KEY: dummy-key
run: python manage.py test

0 comments on commit 8f6dc2d

Please sign in to comment.