-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.46 KB
/
python-package.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
name: Python package
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pylint build
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Analysing the code with pylint
run: |
pylint --fail-under=9.5 --disable=R0401,E0611 $(git ls-files '*.py')
- name: Test with pytest
run: |
pytest -v ./eryx/tests/run_tests.py
- name: Build package
run: |
python -m build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: python-package
path: dist/
- name: Create GitHub beta release
uses: softprops/action-gh-release@v1
with:
tag_name: beta-${{ github.run_number }}
name: "Beta Release ${{ github.run_number }}"
body: |
This is an automated beta release containing build artifacts from the latest commit.
draft: false # Automatically publish the release
prerelease: true
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}