Convert CI to Forgejo, add AI review, update tox Python versions
All checks were successful
CI via Tox / tox (pull_request) Successful in 1m30s
All checks were successful
CI via Tox / tox (pull_request) Successful in 1m30s
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
30a10a7a13
commit
29dea9d45f
5 changed files with 50 additions and 23 deletions
26
.forgejo/workflows/ai-review.yml
Normal file
26
.forgejo/workflows/ai-review.yml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
name: AI Code Review
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
ai-review:
|
||||
if: forgejo.event.label.name == 'ai-review-please'
|
||||
runs-on: fedora
|
||||
container:
|
||||
image: registry.gitlab.com/redhat/edge/ci-cd/ai-code-review:v2.3.0
|
||||
steps:
|
||||
- name: Run AI Review
|
||||
env:
|
||||
AI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
||||
run: ai-code-review --platform forgejo --pr-number ${{ forgejo.event.pull_request.number }} --post
|
||||
|
||||
# this has to be a separate job because ai-code-review container does not have nodejs in it
|
||||
# also note this does not work for PRs from forks because of a forgejo bug
|
||||
# https://codeberg.org/forgejo/forgejo/issues/10733
|
||||
remove-label:
|
||||
runs-on: fedora
|
||||
steps:
|
||||
- uses: https://github.com/actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
|
||||
with:
|
||||
labels: ai-review-please
|
||||
23
.forgejo/workflows/ci.yml
Normal file
23
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: CI via Tox
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
tox:
|
||||
runs-on: fedora
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
container:
|
||||
image: quay.io/fedora/fedora:latest
|
||||
steps:
|
||||
- name: Install required packages
|
||||
run: dnf -y install nodejs tox git
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Python interpreters
|
||||
run: for py in 3.6 3.10 3.11 3.12 3.13 3.14; do dnf -y install python$py; done
|
||||
- name: Test with tox
|
||||
run: tox
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
- job:
|
||||
name: wikitcms-tox
|
||||
run: ci/tox.yaml
|
||||
nodeset: fedora-latest-container
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- wikitcms-tox
|
||||
14
ci/tox.yaml
14
ci/tox.yaml
|
|
@ -1,14 +0,0 @@
|
|||
- hosts: all
|
||||
tasks:
|
||||
- name: Ensure tox is installed
|
||||
include_role:
|
||||
name: ensure-tox
|
||||
- name: Install all Python versions to test
|
||||
package:
|
||||
name: ['python3.6', 'python3.8', 'python3.9', 'python3.10', 'python3.11', 'python3.12', 'python3.13']
|
||||
state: present
|
||||
become: yes
|
||||
- name: Run tox
|
||||
command: "{{ tox_executable }}"
|
||||
args:
|
||||
chdir: '{{ zuul.project.src_dir }}'
|
||||
2
tox.ini
2
tox.ini
|
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py36,py38,py39,py310,py311,py312,py313,coverage-report
|
||||
envlist = py36,py310,py311,py312,py313,py314,coverage-report
|
||||
skip_missing_interpreters = true
|
||||
isolated_build = true
|
||||
[testenv]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue