update github actions
This commit is contained in:
19
.github/workflows/black-formatter-test.yml
vendored
19
.github/workflows/black-formatter-test.yml
vendored
@@ -1,19 +0,0 @@
|
||||
name: Black Formatter (PR Check)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "**" # Run on pull requests for all branches
|
||||
|
||||
jobs:
|
||||
linter:
|
||||
name: runner / black
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Run Black formatter (check mode)
|
||||
uses: psf/black@stable
|
||||
with:
|
||||
options: "--check -l 80"
|
||||
src: "./pina"
|
||||
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: "Coverage Deploy to Codacy"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test_deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install .[test]
|
||||
|
||||
- name: Test with pytest
|
||||
env:
|
||||
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pina
|
||||
curl -s https://coverage.codacy.com/get.sh -o CodacyCoverageReporter.sh
|
||||
chmod +x CodacyCoverageReporter.sh
|
||||
./CodacyCoverageReporter.sh report -r cobertura.xml -t $CODACY_API_TOKEN
|
||||
|
||||
18
.github/workflows/create-release.yml
vendored
18
.github/workflows/create-release.yml
vendored
@@ -1,18 +0,0 @@
|
||||
name: Releases
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
58
.github/workflows/deployer.yml
vendored
Normal file
58
.github/workflows/deployer.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: "Deployer"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
|
||||
docs: #######################################################################
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: python3 -m pip install .[doc]
|
||||
|
||||
- name: Build Documentation
|
||||
run: |
|
||||
make html
|
||||
working-directory: docs/
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
#deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
|
||||
publish_dir: ./docs/build/html
|
||||
allow_empty_commit: true
|
||||
|
||||
release_github: #############################################################
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
pypi: #######################################################################
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install build
|
||||
run: >-
|
||||
python -m pip install build --user
|
||||
|
||||
- name: Build a binary wheel and a source tarball
|
||||
run: >-
|
||||
python -m build --sdist --wheel --outdir dist/ .
|
||||
|
||||
- name: Publish distribution to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
23
.github/workflows/draft-pdf.yml
vendored
23
.github/workflows/draft-pdf.yml
vendored
@@ -1,23 +0,0 @@
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
paper:
|
||||
runs-on: ubuntu-latest
|
||||
name: Paper Draft
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Build draft PDF
|
||||
uses: openjournals/openjournals-draft-action@master
|
||||
with:
|
||||
journal: joss
|
||||
# This should be the path to the paper within your repo.
|
||||
paper-path: joss/paper.md
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: paper
|
||||
# This is the output path where Pandoc will write the compiled
|
||||
# PDF. Note, this should be the same directory as the input
|
||||
# paper.md
|
||||
path: joss/paper.pdf
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Black Formatter
|
||||
name: Master Cleaner
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -6,15 +6,14 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
linter:
|
||||
formatter:
|
||||
name: runner / black
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: psf/black@stable
|
||||
with:
|
||||
options: "-l 80"
|
||||
src: "./pina"
|
||||
|
||||
- name: Create Pull Request
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Monthly Automated Tag
|
||||
name: "Monthly Tagger"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.NDEMO_PAT_TOKEN }}
|
||||
|
||||
31
.github/workflows/pypi-publish.yml
vendored
31
.github/workflows/pypi-publish.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: "PYPI Publish"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install build
|
||||
run: >-
|
||||
python -m pip install build --user
|
||||
|
||||
- name: Build a binary wheel and a source tarball
|
||||
run: >-
|
||||
python -m build --sdist --wheel --outdir dist/ .
|
||||
|
||||
- name: Publish distribution to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
26
.github/workflows/sphinx-build.yml
vendored
26
.github/workflows/sphinx-build.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: "Documentation Deploy"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create the new documentation
|
||||
uses: ammaraskar/sphinx-action@7.4.7
|
||||
with:
|
||||
pre-build-command: "python3 -m pip install .[doc]"
|
||||
docs-folder: "docs/"
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
#deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
|
||||
publish_dir: ./docs/build/html
|
||||
allow_empty_commit: true
|
||||
73
.github/workflows/tester.yml
vendored
Normal file
73
.github/workflows/tester.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
name: "Testing Pull Request"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
- "dev"
|
||||
|
||||
jobs:
|
||||
unittests: #################################################################
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
||||
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install .[test]
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
python3 -m pytest
|
||||
|
||||
linter: ####################################################################
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run Black formatter (check mode)
|
||||
uses: psf/black@stable
|
||||
with:
|
||||
src: "./pina"
|
||||
|
||||
testdocs: ##################################################################
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: python3 -m pip install .[doc]
|
||||
|
||||
- name: Build Documentation
|
||||
run: |
|
||||
make html SPHINXOPTS+='-W'
|
||||
working-directory: docs/
|
||||
|
||||
coverage: ##################################################################
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pina
|
||||
|
||||
- name: Produce the coverage report
|
||||
uses: insightsengineering/coverage-action@v2
|
||||
with:
|
||||
path: ./cobertura.xml
|
||||
threshold: 80.123
|
||||
fail: true
|
||||
publish: true
|
||||
coverage-summary-title: "Code Coverage Summary"
|
||||
23
.github/workflows/testing_doc.yml
vendored
23
.github/workflows/testing_doc.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: Test Sphinx Documentation Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
- "0.2"
|
||||
paths:
|
||||
- 'docs/**'
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: python3 -m pip install .[doc]
|
||||
|
||||
- name: Build Documentation
|
||||
run: |
|
||||
make html SPHINXOPTS+='-W'
|
||||
working-directory: docs/
|
||||
34
.github/workflows/testing_pr.yml
vendored
34
.github/workflows/testing_pr.yml
vendored
@@ -1,34 +0,0 @@
|
||||
name: "Testing Pull Request"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
- "0.2"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
||||
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install .[test]
|
||||
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
python3 -m pytest
|
||||
@@ -3,9 +3,11 @@ name: "Export Tutorials"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**" # Run on push on all branches
|
||||
- "dev"
|
||||
- "master"
|
||||
paths:
|
||||
- 'tutorials/**/*.ipynb'
|
||||
|
||||
jobs:
|
||||
export_tutorials:
|
||||
permissions: write-all
|
||||
@@ -37,6 +39,7 @@ jobs:
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
|
||||
- name: Export tutorials to .py and .html
|
||||
run: |
|
||||
set -x
|
||||
@@ -61,6 +64,7 @@ jobs:
|
||||
- name: Remove unwanted files
|
||||
run: |
|
||||
rm -rf build/ tutorials/tutorial4/data/
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5.0.2
|
||||
with:
|
||||
Reference in New Issue
Block a user