-
Notifications
You must be signed in to change notification settings - Fork 343
128 lines (120 loc) · 3.71 KB
/
prerelease.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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:40
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/