Skip to content

Test stability improvements2 (#1040) #516

Test stability improvements2 (#1040)

Test stability improvements2 (#1040) #516

name: CI_TEST
on:
push:
branches: [ "master" ]
paths:
- '**.py'
- '**.yml'
pull_request:
branches: [ "master" ]
workflow_dispatch: # allow manual run
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
with:
python-version: ${{ matrix.python-version }}
- name: Install python
run: uv python install
- name: Install dependencies
run: |
sudo apt-get update; sudo apt-get install libkrb5-dev gcc
- name: Lint with ruff
run: |
uv run ruff check jenkinsapi/ --output-format full
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
allowed-endpoints: >
azure.archive.ubuntu.com:80
esm.ubuntu.com:443
files.pythonhosted.org:443
ftp-chi.osuosl.org:443
ftp-nyc.osuosl.org:443
get.jenkins.io:443
github.com:443
api.github.com:443
int.api.stepsecurity.io:443
mirror.xmission.com:443
motd.ubuntu.com:443
packages.microsoft.com:443
ppa.launchpadcontent.net:443
pypi.org:443
updates.jenkins-ci.org:80
updates.jenkins.io:443
mirrors.updates.jenkins.io:443
updates.jenkins.io:80
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
with:
python-version: ${{ matrix.python-version }}
- name: Install python
run: uv python install
- name: setup java 25
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: '25'
distribution: 'temurin'
- name: Install dependencies
run: |
sudo apt-get update; sudo apt-get install libkrb5-dev gcc
- name: Test with pytest
run: |
uv run pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests