Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
g0tmi1k committed Feb 18, 2025
1 parent cbaffc7 commit 4089cf3
Showing 1 changed file with 51 additions and 155 deletions.
206 changes: 51 additions & 155 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,113 +32,6 @@ env:
python3-pip
jobs:
checks:
name: Checks
runs-on: ubuntu-latest

# Steps to perform in job
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Python style checks (Ruff)
if: always()
run: |
set -x
pip3 install --break-system-packages --upgrade \
ruff
make ruff
- name: HTML style checks (djLint)
if: always()
run: |
set -x
pip3 install --break-system-packages --upgrade \
djlint
make djlint
- name: YAML style checks (yamllint)
if: always()
run: |
set -x
pip3 install --break-system-packages --upgrade \
yamllint
make yamllint
- name: Rust style checks (rustfmt)
if: always()
run: |
set -x
sudo apt-get update --yes
sudo apt-get satisfy --yes --no-install-recommends \
rustc
cargo fmt --check --all
- name: Check common misspellings (codespell)
if: always()
run: |
set -x
pip3 install --break-system-packages --upgrade \
codespell
codespell
build:
name: Build - Ubuntu LTS (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
fail-fast: false

# Steps to perform in job
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

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

- name: Install dependencies (apt)
run: |
set -x
sudo apt-get update --yes
sudo apt-get satisfy --yes --no-install-recommends \
${CORE_DEB}
sudo apt-get satisfy --yes --no-install-recommends \
${EXTRA_DEB}
# Isn't technically needed to build/compile - Disabling, to speed up CI
#- name: Install dependencies (rust)
# run: |
# set -x
# git clone https://github.com/jelmer/ognibuild.git /tmp/ognibuild/
# pushd /tmp/ognibuild/
# cargo build --verbose --release #-p dep-server
# ls -l /tmp/ognibuild/target/release/

- name: PIP install
run: |
set -x
pip3 install --break-system-packages --upgrade --editable \
.
- name: Make
run: |
set -x
make
## Disabling, to speed up CI
#- name: Make all
# run: |
# set -x
# make all

build-container:
name: Build & Test - Debian Testing
Expand Down Expand Up @@ -166,52 +59,52 @@ jobs:
apt-get satisfy --yes --no-install-recommends \
${EXTRA_DEB}
# Isn't technically needed to build/compile
- name: Install dependencies (rust)
run: |
set -x
git clone https://github.com/jelmer/ognibuild.git /build/ognibuild/
cd /build/ognibuild/
cargo build --verbose --release #-p dep-server
ls -l /build/ognibuild/target/release/
- name: PIP install
run: |
set -x
pip3 install --break-system-packages --upgrade --editable \
.
## Make all does this, and then some - Disabling, to speed up CI
#- name: Make
# run: |
# set -x
# make

- name: Make all
run: |
set -x
make all
- name: Python static typing checks (mypy)
if: always()
run: |
set -x
apt-get satisfy --yes --no-install-recommends \
python3-breezy.tests
pip3 install --break-system-packages --upgrade --editable \
.[typing]
make typing
- name: Test config (janitor.debian.net)
if: always()
run: |
set -x
apt-get satisfy --yes --no-install-recommends \
git
git clone https://salsa.debian.org/janitor-team/janitor.debian.net \
janitor.debian.net
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python PYTHONPATH=py \
python3 -m janitor.config janitor.debian.net/k8s/janitor.conf
# # Isn't technically needed to build/compile
# - name: Install dependencies (rust)
# run: |
# set -x
# git clone https://github.com/jelmer/ognibuild.git /build/ognibuild/
# cd /build/ognibuild/
# cargo build --verbose --release #-p dep-server
# ls -l /build/ognibuild/target/release/
#
# - name: PIP install
# run: |
# set -x
# pip3 install --break-system-packages --upgrade --editable \
# .
#
# ## Make all does this, and then some - Disabling, to speed up CI
# #- name: Make
# # run: |
# # set -x
# # make
#
# - name: Make all
# run: |
# set -x
# make all
#
# - name: Python static typing checks (mypy)
# if: always()
# run: |
# set -x
# apt-get satisfy --yes --no-install-recommends \
# python3-breezy.tests
# pip3 install --break-system-packages --upgrade --editable \
# .[typing]
# make typing
#
# - name: Test config (janitor.debian.net)
# if: always()
# run: |
# set -x
# apt-get satisfy --yes --no-install-recommends \
# git
# git clone https://salsa.debian.org/janitor-team/janitor.debian.net \
# janitor.debian.net
# PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python PYTHONPATH=py \
# python3 -m janitor.config janitor.debian.net/k8s/janitor.conf

- name: Test using ./tests/test_*.py (unittest)
if: always()
Expand All @@ -229,8 +122,11 @@ jobs:
.[test]
if test "$(id -u)" = "0"; then
echo "-- Switching to postgres user"
su postgres;
chown -R postgres: .
su postgres -c 'make test'
else
echo "-- Running as: $(whoami)"
make test
fi
make test
env:
PYTHONHASHSEED: random

0 comments on commit 4089cf3

Please sign in to comment.