-
Notifications
You must be signed in to change notification settings - Fork 242
101 lines (89 loc) · 2.86 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
static-checks:
name: Static checks
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check signed-off-by
run: ./selftests/signedoff-check.sh
- name: Install make
run: sudo apt-get update && sudo apt-get install -y make
- name: Install dependencies
run: pip install -r requirements-travis.txt
- name: Run tests
run: make check
travis-check:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.1]
fail-fast: false
steps:
- run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}"
- name: Check out repository code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r requirements-travis.txt
- name: Check out Avocado libs
uses: actions/checkout@v2
with:
repository: 'avocado-framework/avocado'
path: 'avocado-libs'
fetch-depth: 0
- name: Install avocado libs
working-directory: ./avocado-libs
run: |
python -m pip install --upgrade pip
pip install 'setuptools-rust==1.1.2'
pip install -e .
- name: Finish installing dependencies
run: |
pip install -e .
- name: Create some fake binaries to make vt-bootstrap happy
run: |
mkdir -p /tmp/dummy_bin
touch /tmp/dummy_bin/arping
touch /tmp/dummy_bin/tcpdump
chmod 777 /tmp/dummy_bin/*
echo "/tmp/dummy_bin" >> $GITHUB_PATH
- name: Setup Avocado-vt for functional tests
run: AVOCADO_LOG_DEBUG=yes avocado vt-bootstrap --vt-skip-verify-download-assets --yes-to-all
- run: echo "This job's status is ${{ job.status }}."
package-build:
name: Build Package for Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10.1]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Build eggs
run: python setup.py bdist_egg
- run: echo "🥑 This job's status is ${{ job.status }}."