Skip to content

Commit d1a0717

Browse files
jirihnidekm-horky
authored andcommitted
chore[ci]: Added Github action for regular testing package
* Added CI job for testing python-iniparse on latest Fedoras and CentOS 10. Tests are triggered on PR request and should be triggered every week on Monday morning * Added script for installing required packages * Also dded configuration for dependabot
1 parent 133cf6a commit d1a0717

3 files changed

Lines changed: 63 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
target-branch: "main"
8+
commit-message:
9+
prefix: "ci"

.github/workflows/pytest.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: pytest
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
schedule:
7+
# at 5:00 every 1st of the month
8+
- cron: 0 5 1 * *
9+
10+
jobs:
11+
pytest:
12+
name: "pytest"
13+
14+
permissions:
15+
issues: write
16+
pull-requests: write
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- name: "CentOS Stream 10"
23+
image: "quay.io/centos/centos:stream10"
24+
- name: "Fedora latest"
25+
image: "fedora:latest"
26+
- name: "Fedora Rawhide"
27+
image: "fedora:rawhide"
28+
29+
runs-on: ubuntu-latest
30+
container:
31+
image: ${{ matrix.image }}
32+
33+
steps:
34+
- name: "Checkout repository"
35+
uses: actions/checkout@v4
36+
37+
- name: "Run container-pre-test.sh"
38+
run: |
39+
bash scripts/container-pre-test.sh
40+
41+
- name: "Run pytest"
42+
env:
43+
PYTEST_ADDOPTS: "--color=yes --code-highlight=yes --showlocals"
44+
run: python3 -m pytest ${{ matrix.pytest_args }}

scripts/container-pre-test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
source /etc/os-release
4+
# This repository is required for python3-pytest and python3-test
5+
# on Centos Stream
6+
if [[ $ID == "centos" ]]; then
7+
dnf config-manager --enable crb
8+
fi
9+
10+
dnf install -y python3-setuptools python3-pip python3-devel python3-pytest python3-test

0 commit comments

Comments
 (0)