-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·61 lines (56 loc) · 1.5 KB
/
python-test.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
name: Python test
on:
push:
branches: main
tags: v*.*.*
pull_request:
branches: [ "main" ]
types:
- synchronize
- opened
- reopened
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
permissions:
contents: write
discussions: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-virtualenv python3-all
pip install wheel stdeb
- name: Install fpm dependencies
run: |
sudo apt-get install -y ruby ruby-dev rubygems build-essential
sudo gem install -N fpm
- name: Install dh-virtualenv dependencies
run: |
sudo apt-get install -y debhelper devscripts equivs dh-virtualenv dh-python
- name: Verify code quality
run: |
cd python
pip install mypy flake8 pytest
mypy
flake8
pytest
- name: Create Release Bundle
if: startsWith(github.ref, 'refs/tags/')
run: |
./build.sh
-
name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
generate_release_notes: true
files: |
dist/*.tar.gz