-
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
24 changed files
with
690 additions
and
1 deletion.
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,19 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "maven" # See documentation for possible values | ||
directory: "/data/local/test_basic/layout_maven/ms-101" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,40 @@ | ||
name: Build PyPI | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
linting: | ||
name: Reuse linting job | ||
uses: ./.github/workflows/lint.yml | ||
|
||
build: | ||
needs: linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 #full history | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: pip install hatch | ||
- name: Run unit and integrations tests | ||
run: hatch run test:pytest --cov=reqstool-python-decorators --cov-report=xml --cov-report=html | ||
- name: Build project | ||
run: hatch build | ||
# Upload artifacts for later use | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist/ |
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,11 @@ | ||
name: Lint (black and flake8) | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
check-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check branch and tag | ||
if: github.event_name == 'push' && !(github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v')) | ||
run: exit 1 |
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,21 @@ | ||
name: Lint (black and flake8) | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install pip package(s) | ||
run: pip install hatch | ||
- name: Run black formatter check | ||
run: hatch run lint:black --check --verbose src tests | ||
- name: Run flake8 linter | ||
run: hatch run lint:flake8 |
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,47 @@ | ||
name: Publish to GitHub Pages | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: github-pages | ||
cancel-in-progress: false | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Configure Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
- name: Install Antora | ||
run: npm i antora | ||
- name: Install Asciidoctor Kroki extension | ||
run: npm i asciidoctor asciidoctor-kroki | ||
- name: Generate Site | ||
run: npx antora docs/antora-playbook.yml | ||
- name: Create site folders | ||
run: mkdir -p docs/build/site | ||
- name: Upload Artifacts | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/build/site | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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: Build and publish to PyPI | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
check-release: | ||
name: Reuse check release | ||
uses: ./.github/workflows/check_release.yml | ||
build: | ||
name: Reuse build | ||
uses: ./.github/workflows/build.yml | ||
|
||
|
||
publish-to-pypi: | ||
needs: | ||
- check-release | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: prod | ||
url: https://pypi.org/p/reqstool-client | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
# Download artifacts from the build job | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Publish distribution 📦 to PyPI | ||
# if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
sign-artifacts: true |
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,32 @@ | ||
name: Build and publish to Test PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Reuse build | ||
uses: ./.github/workflows/build.yml | ||
|
||
publish-to-test-pypi: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
# Specifying a GitHub environment is optional, but strongly encouraged | ||
environment: | ||
name: test | ||
url: https://test.pypi.org/p/reqstool-client | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
# Download artifacts from the build job | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Publish distribution 📦 to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
sign-artifacts: true | ||
skip-existing: true |
Oops, something went wrong.