This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
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.
Merge pull request #294 from pitt-crc/development
Merge Development into Main for New Bank Deployment
- Loading branch information
Showing
102 changed files
with
7,285 additions
and
3,608 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,15 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
open-pull-requests-limit: 100 | ||
ignore: | ||
- dependency-name: "sphinx-jsonschema" # Newer versions of sphinx-jsonschema have compatibility issues | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
open-pull-requests-limit: 100 |
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,44 @@ | ||
name: Build Documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
jobs: | ||
build: | ||
name: Build Documentation | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/pitt-crc/test-env:latest | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- name: Setup environment | ||
run: /usr/local/bin/entrypoint.sh | ||
|
||
- name: Checkout project source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: false | ||
|
||
- name: Install dependencies | ||
run: poetry install --with docs | ||
|
||
- name: Build docs | ||
working-directory: docs | ||
run: make html SPHINXOPTS="-W" | ||
|
||
- name: Upload docs to artifact storage | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: docs/build/html |
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,37 @@ | ||
name: Publish Documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
branches: | ||
- "development" | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/DocumentationBuild.yml | ||
secrets: inherit | ||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
deploy: | ||
name: Deploy Documentation | ||
needs: [ build ] | ||
|
||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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,84 @@ | ||
name: Publish Package | ||
|
||
on: | ||
release: | ||
types: [ released ] | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
run-tests: | ||
name: Tests | ||
uses: ./.github/workflows/PackageTest.yml | ||
secrets: inherit | ||
|
||
build-docs: | ||
name: Docs | ||
needs: run-tests | ||
uses: ./.github/workflows/DocumentationBuild.yml | ||
secrets: inherit | ||
|
||
publish-package: | ||
name: Publish Distribution | ||
needs: build-docs | ||
runs-on: ubuntu-latest | ||
environment: ${{ matrix.environment }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- host: https://py00.crc.pitt.edu | ||
environment: publish-h2p | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: false | ||
|
||
# Get the new package version from the release tag | ||
# Git release tags are expected to start with "refs/tags/v" | ||
- name: Set package version | ||
run: | | ||
release_tag=${{github.ref}} | ||
poetry version "${release_tag#refs/tags/v}" | ||
- name: Build package | ||
run: poetry build -v | ||
|
||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
print-hash: true | ||
repository-url: ${{ matrix.host }} | ||
user: ${{ secrets.REPO_USER }} | ||
password: ${{ secrets.REPO_PASSWORD }} | ||
|
||
publish-docs: | ||
name: Deploy Documentation | ||
needs: [ build-docs, publish-package ] | ||
|
||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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,80 @@ | ||
name: Test Package | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
push: | ||
|
||
jobs: | ||
run-tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
slurm_version: | ||
- 20.02.5.1 | ||
- 20.11.9.1 | ||
- 22.05.2.1 | ||
python_version: | ||
- 3.8 | ||
- 3.9 | ||
|
||
container: | ||
image: ghcr.io/pitt-crc/test-env:${{ matrix.slurm_version }} | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- name: Setup environment | ||
run: /usr/local/bin/entrypoint.sh | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install poetry | ||
run: | | ||
pip install poetry | ||
poetry env use python${{ matrix.python_version }} | ||
- name: Install dependencies | ||
run: poetry install --with tests | ||
|
||
- name: Run tests with coverage | ||
run: | | ||
poetry run coverage run -m unittest discover | ||
poetry run coverage report --omit="tests/*" | ||
poetry run coverage xml --omit="tests/*" -o coverage.xml | ||
# Report partial coverage results to codacy for the current python version | ||
- name: Report partial coverage results | ||
if: github.event_name != 'release' | ||
shell: bash | ||
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l Python -r coverage.xml | ||
env: | ||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
|
||
# Tell codacy we are done reporting test coverage | ||
report-code-coverage: | ||
name: Report Coverage | ||
if: github.event_name != 'release' | ||
needs: run-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Finish reporting coverage | ||
shell: bash | ||
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final | ||
env: | ||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
|
||
# Use this job for branch protection rules | ||
report-test-status: | ||
name: Report Test Status | ||
if: always() | ||
needs: run-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check build status | ||
if: ${{ contains(needs.*.result, 'failure') }} | ||
run: exit 1 |
Oops, something went wrong.