Skip to content

Commit

Permalink
Add GHA Automation
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Oct 25, 2024
1 parent 6e5d7ed commit c4e7c9d
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Run License Tests
on:
push:
workflow_dispatch:
pull_request:
branches:
- master
jobs:
license_tests:
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master
with:
packages-exclude: '^(neon-users-service).*'
27 changes: 27 additions & 0 deletions .github/workflows/propose_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Propose Stable Release
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: Release Type
options:
- patch
- minor
- major
jobs:
update_version:
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master
with:
branch: dev
release_type: ${{ inputs.release_type }}
update_changelog: True
pull_changes:
uses: neongeckocom/.github/.github/workflows/pull_master.yml@master
needs: update_version
with:
pr_reviewer: neonreviewers
pr_assignee: ${{ github.actor }}
pr_draft: false
pr_title: ${{ needs.update_version.outputs.version }}
pr_body: ${{ needs.update_version.outputs.changelog }}
16 changes: 16 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This workflow will generate a release distribution and upload it to PyPI

name: Publish Build and GitHub Release
on:
push:
branches:
- master

jobs:
build_and_publish_pypi_and_release:
uses: neongeckocom/.github/.github/workflows/publish_stable_release.yml@master
secrets: inherit
# build_and_publish_docker:
# needs: build_and_publish_pypi_and_release
# uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master
# secrets: inherit
21 changes: 21 additions & 0 deletions .github/workflows/publish_test_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This workflow will generate a distribution and upload it to PyPI

name: Publish Alpha Build
on:
push:
branches:
- dev
paths-ignore:
- 'version.py'

jobs:
publish_alpha_release:
uses: neongeckocom/.github/.github/workflows/publish_alpha_release.yml@master
secrets: inherit
with:
version_file: "version.py"
publish_prerelease: true
# build_and_publish_docker:
# needs: publish_alpha_release
# uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master
# secrets: inherit
41 changes: 41 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will run unit tests

name: Run Unit Tests
on:
push:
workflow_dispatch:
pull_request:
branches:
- master

jobs:
py_build_tests:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
with:
python_version: "3.8"
docker_build_tests:
uses: neongeckocom/.github/.github/workflows/docker_build_tests.yml@master
unit_tests:
strategy:
max-parallel: 1
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]]
- name: Unit Tests
run: |
pytest tests --doctest-modules --junitxml=tests/unit-test-results.xml
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: unit-test-results-${{matrix.python-version}}
path: tests/unit-test-results.xml

0 comments on commit c4e7c9d

Please sign in to comment.