-
-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (67 loc) · 2.21 KB
/
main.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
---
name: CI
on:
workflow_dispatch:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' # match basic semver tags
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.12.2
- name: Install build & test dependencies
run: |
pip3 install --disable-pip-version-check --progress-bar off 'poetry'
poetry install --no-ansi --no-interaction
- name: Run linters
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.11.4
- name: Install build & test dependencies
run: |
pip3 install --disable-pip-version-check --progress-bar off 'poetry'
- name: Cache dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: ${{ runner.os }}-pip-
- name: Build & install
run: |
poetry build --no-ansi --no-interaction && \
poetry install --no-ansi --no-interaction
- name: Run tests
run: poetry run pytest --full-trace
- name: Test basic cli elements
run: |
( set -x ; poetry run isup --version )
( set -x ; poetry run isup --help )
release:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Ship a release
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v2.0.6
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
dist/downforeveryone*.whl
dist/downforeveryone*.tar.gz