-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mietzen/fritzos-7.56
Fritzos 7.56
- Loading branch information
Showing
7 changed files
with
279 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Python Lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
Test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with ruff | ||
env: | ||
PY_VER: ${{ matrix.python-version }} | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
PY_VER=$(echo py${PY_VER} | tr -d '.') | ||
ruff --format=github --ignore=E501 --exclude=__init__.py --target-version=${PY_VER} . | ||
Check-Test: | ||
if: ${{ always() }} | ||
runs-on: ubuntu-latest | ||
needs: | ||
- Test | ||
steps: | ||
- run: | | ||
result="${{ needs.Test.result }}" | ||
if [[ $result == "success" || $result == "skipped" ]]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build & Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
Setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.set-version.outputs.version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get Version | ||
id: set-version | ||
env: | ||
VERSION: ${{ github.ref_name }} | ||
run: | | ||
if grep -c -E '^v[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}$' <<< ${VERSION}; then | ||
VERSION=$(sed 's/^.\{1\}//g' <<< ${VERSION}) | ||
else | ||
echo "This branch shouldn't be build: ${VERSION}" | ||
exit 1 | ||
fi | ||
echo "version=$(echo ${VERSION})" >> $GITHUB_OUTPUT | ||
Deploy: | ||
runs-on: ubuntu-latest | ||
needs: Setup | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
env: | ||
VERSION: ${{ needs.Setup.outputs.version }} | ||
run: python -m build --wheel | ||
- name: Publish package | ||
uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.