Skip to content

Pre-release tests

Pre-release tests #40

Workflow file for this run

name: Pre-release tests
on:
# Runs at 5:00 UTC on Mondays
schedule:
- cron: "0 5 * * 1"
workflow_dispatch:
jobs:
make-check:
name: Run 'make check'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Installing Avocado in develop mode
run: python3 setup.py develop --user
- name: Run make check
run: make check
- name: Save artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: job-results-make-check
path: /home/runner/avocado/job-results/
retention-days: 1
avocado-pre-release:
name: Avocado pre-release job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install avocado
run: |
sudo python3 -m pip install -r requirements-dev.txt
python3 setup.py develop --user
- name: Avocado pre-release job
run: ./selftests/pre_release/jobs/pre_release.py
- name: Save artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: job-results-pre-release
path: /home/runner/avocado/job-results/
retention-days: 1
check-rpm-available-copr:
name: Check the right RPM packages are available in COPR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'master'
- name: Check the right RPM packages are available
run: ./selftests/pre_release/tests/check-copr-rpm-version.sh
avocado-deployment-copr:
name: Avocado deployment
runs-on: ubuntu-latest
container:
image: fedora:38
env:
GIT_URL: 'https://github.com/avocado-framework/avocado'
INVENTORY: 'selftests/deployment/inventory'
PLAYBOOK: 'selftests/deployment/deployment.yml'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Ansible
run: dnf install -y git ansible
- name: Run Ansible playbook
run: ansible-pull -v -U ${{env.GIT_URL}} -i ${{env.INVENTORY}} -c local ${{env.PLAYBOOK}} -e "method=copr"
- name: Run test
run: avocado run /usr/bin/true
- name: Save artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: job-results-deployment
path: /github/home/avocado/job-results/
retention-days: 1
package-build:
name: Build Package (wheel/tarball)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build tarballs and wheels
run: make -f Makefile.gh build-wheel check-wheel
- name: Save tarballs and wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: tarballs_and_wheels
path: ${{github.workspace}}/PYPI_UPLOAD/
retention-days: 1
- run: echo "🥑 This job's status is ${{ job.status }}."
publish-to-test-pypi:
name: Publish Avocado to TestPyPI
needs:
- package-build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/avocado-framework
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the wheels
uses: actions/download-artifact@v4
with:
name: tarballs_and_wheels
path: dist/
- name: Publish avocado to test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/