Skip to content

Commit

Permalink
updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
builderjer committed Oct 21, 2024
1 parent 2ac12c9 commit 6d0ca85
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 248 deletions.
50 changes: 6 additions & 44 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,11 @@
name: Run Build Tests
name: Unit Tests
on:
push:
branches:
- master
pull_request:
branches:
- dev
workflow_dispatch:

jobs:
build_tests:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.8, 3.9, "3.10" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev
- name: Build Source Packages
run: |
python setup.py sdist
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Install repo
run: |
pip install .
- uses: pypa/[email protected]
with:
# Ignore irrelevant Mercurial vulnerability
# Ignore `requests` and `urllib3` vulnerabilities as they are not used in this package
# Ignore `setuptools` and `pip` vulnerabilities I don't think they apply here
ignore-vulns: |
PYSEC-2023-228
GHSA-9wx4-h78v-vm56
GHSA-34jh-p97f-mpxf
PYSEC-2022-43012
py_build_tests:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
with:
python_version: "3.8"

20 changes: 0 additions & 20 deletions .github/workflows/dev2master.yml

This file was deleted.

36 changes: 4 additions & 32 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,11 @@
name: Run License Tests
on:
push:
branches:
- master
workflow_dispatch:
pull_request:
branches:
- dev
workflow_dispatch:

- master
jobs:
license_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev
- name: Install core repo
run: |
pip install .
- name: Check python
id: license_check_report
uses: pilosus/[email protected]
with:
fail: 'Copyleft,Other,Error'
fails-only: true
exclude-license: '^(Mozilla).*$'
- name: Print report
if: ${{ always() }}
run: echo "${{ steps.license_check_report.outputs.report }}"
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master

137 changes: 0 additions & 137 deletions .github/workflows/publish_alpha.yml

This file was deleted.

32 changes: 17 additions & 15 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
publish_alpha:
if: github.event.pull_request.merged == true
uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master
secrets: inherit
with:
Expand All @@ -17,6 +18,22 @@ jobs:
publish_prerelease: true
changelog_max_issues: 100

notify:
if: github.event.pull_request.merged == true
needs: publish_alpha
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Send message to Matrix bots channel
id: matrix-chat-message
uses: fadenb/[email protected]
with:
homeserver: 'matrix.org'
token: ${{ secrets.MATRIX_TOKEN }}
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org'
message: |
new ${{ github.event.repository.name }} PR merged! https://github.com/${{ github.repository }}/pull/${{ github.event.number }}
publish_pypi:
needs: publish_alpha
if: success() # Ensure this job only runs if the previous job succeeds
Expand All @@ -36,20 +53,6 @@ jobs:
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: V${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: true
commitish: dev
- name: Build Distribution Packages
run: |
python setup.py sdist bdist_wheel
Expand Down Expand Up @@ -102,4 +105,3 @@ jobs:
-H "Authorization: token $GITHUB_TOKEN" \
-d "{\"title\":\"$PR_TITLE\",\"body\":\"$PR_BODY\",\"head\":\"$HEAD_BRANCH\",\"base\":\"$BASE_BRANCH\"}" \
https://api.github.com/repos/${{ github.repository }}/pulls

0 comments on commit 6d0ca85

Please sign in to comment.