Skip to content

Commit a147363

Browse files
committed
github_actions: run python tox on commit / pull
Use github action ubuntu-22.04 environment to install tox and then run all tox envs defined in the tox.ini Change-Id: I7f91314a2b9cd276e63cf2158100795c6bfc8ff3
1 parent 912eea8 commit a147363

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/unit_tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Cloudbase-Init unit tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-22.04
8+
strategy:
9+
matrix:
10+
python-version: ["3.8","3.9","3.10"]
11+
architecture: ["x64"]
12+
13+
steps:
14+
- name: Checkout cloudbase-init repository
15+
uses: actions/checkout@v3
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
architecture: ${{ matrix.architecture }}
21+
- name: Install python3 tox
22+
shell: bash
23+
run: |
24+
python3 -m pip install tox
25+
- name: Run Cloudbase-Init unit tests with tox
26+
shell: bash
27+
run: |
28+
tox run-parallel -e py3,pep8,cover,docs -v

0 commit comments

Comments
 (0)