-
Notifications
You must be signed in to change notification settings - Fork 674
66 lines (63 loc) · 1.67 KB
/
imgtool.yaml
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
on:
push:
branches:
- main
- v*-branch
pull_request:
name: imgtool
concurrency:
group: imgtool-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x", "pypy3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: |
scripts/setup.py
- name: Install dependencies
run: |
pip install --user pipenv
- name: Run tests
run: |
cd scripts
pipenv run pip install pytest -e .
pipenv run pytest --junitxml=../junit/pytest-results-${{ matrix.python-version }}.xml
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: pytest-results-${{ matrix.python-version }}
path: |
junit/pytest-results-${{ matrix.python-version }}*.xml
if-no-files-found: ignore
environment:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Install packages
run: |
export PATH="$HOME/.local/bin:$PATH"
./ci/imgtool_install.sh
- name: Publish
env:
TWINE_TOKEN: ${{ secrets.TWINE_TOKEN }}
run: |
export PATH="$HOME/.local/bin:$PATH"
./ci/imgtool_run.sh