-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
10 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 |
---|---|---|
|
@@ -4,10 +4,6 @@ on: [ push ] | |
|
||
jobs: | ||
|
||
########################################################################### | ||
# LINTERS | ||
########################################################################### | ||
|
||
py-versions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
|
@@ -17,6 +13,10 @@ jobs: | |
- id: versions | ||
uses: WIPACrepo/[email protected] | ||
|
||
########################################################################### | ||
# LINTERS | ||
########################################################################### | ||
|
||
flake8: | ||
needs: [ py-versions ] | ||
runs-on: ubuntu-latest | ||
|
@@ -45,6 +45,24 @@ jobs: | |
python-version: ${{ matrix.py3 }} | ||
- uses: WIPACrepo/[email protected] | ||
|
||
########################################################################### | ||
# PACKAGING | ||
########################################################################### | ||
|
||
py-setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
- uses: WIPACrepo/[email protected] | ||
with: | ||
python_min: 3.9 | ||
pypi_name: icecube-voka | ||
author: IceCube | ||
author_email: [email protected] | ||
keywords: "histogram comparison" "outlier detection" "statistical tests" "empirical p-value threshold" "poissonian statistics" | ||
|
||
########################################################################### | ||
# TESTS | ||
########################################################################### | ||
|
@@ -75,16 +93,25 @@ jobs: | |
release: | ||
# only run on main/master/default | ||
if: format('refs/heads/{0}', github.event.repository.default_branch) == github.ref | ||
needs: [ flake8, mypy, tests ] | ||
needs: [ flake8, mypy, py-setup, tests ] | ||
runs-on: ubuntu-latest | ||
concurrency: release | ||
concurrency: release # prevent any possible race conditions | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Python Semantic Release | ||
uses: python-semantic-release/[email protected] | ||
# Python-Package Version Bump | ||
- uses: python-semantic-release/[email protected] | ||
id: psr-psr | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# PyPI Release | ||
- uses: pypa/[email protected] | ||
if: steps.psr-psr.outputs.released == 'true' | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
# GitHub Release | ||
- uses: python-semantic-release/[email protected] | ||
if: steps.psr-psr.outputs.released == 'true' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
repository_username: __token__ | ||
repository_password: ${{ secrets.PYPI_TOKEN }} |