-
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
7 changed files
with
134 additions
and
0 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,59 @@ | ||
name: "pytest-plugin-environment" | ||
description: "This action sets up an environment for testing and building pytest plugins" | ||
|
||
|
||
inputs: | ||
|
||
python-version: | ||
description: 'Python version to use' | ||
required: true | ||
default: 3.9 | ||
|
||
poetry-version: | ||
description: 'Poetry version to use' | ||
required: true | ||
default: 1.2.2 | ||
|
||
pipx-version: | ||
description: 'Pipx version to use' | ||
required: true | ||
default: 1.0.0 | ||
|
||
ruff-version: | ||
description: 'Ruff version to use' | ||
required: true | ||
default: 0.2.1 | ||
|
||
just-version: | ||
description: 'Just version to use' | ||
required: true | ||
default: 1.16.0 | ||
|
||
runs: | ||
|
||
using: "composite" | ||
steps: | ||
|
||
- name: Setup Python (${{ inputs.python-version}}) | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Setup Poetry (${{ inputs.poetry-version }}) | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ inputs.poetry-version }} | ||
|
||
- name: Setup pipx (${{ inputs.pipx-version }}) | ||
run: pip install "pipx==${{ inputs.pipx-version }}" | ||
shell: bash | ||
|
||
- name: Setup ruff (${{ inputs.ruff-version }}) | ||
run: pipx install "ruff==${{ inputs.ruff-version }}" | ||
shell: bash | ||
|
||
- name: Setup just (${{ inputs.just-version }}) | ||
uses: extractions/setup-just@v1 | ||
with: | ||
just-version: ${{ inputs.just-version }} | ||
|
Empty file.
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,26 @@ | ||
name: Checks | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
ALTERNATIVE_GITHUB_TOKEN: | ||
required: false | ||
|
||
jobs: | ||
|
||
Checks: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Development Environment | ||
uses: ./.github/actions/pytest-plugins-environment | ||
|
||
- name: Run Tests of all plugins | ||
run: just test | ||
|
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 @@ | ||
name: Continues Integration (Master) | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- mainj | ||
schedule: | ||
# “At 00:00 on every 7th day-of-month from 1 through 31.” (https://crontab.guru) | ||
- cron: "0 0 1/7 * *" | ||
|
||
jobs: | ||
|
||
Checks: | ||
uses: ./.github/workflows/checks.yml |
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,9 @@ | ||
name: Continues Integration (PR) | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
Checks: | ||
uses: ./.github/workflows/checks.yml |
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 @@ | ||
PROJECTS := "pytest-itde" | ||
|
||
# Default target | ||
default: | ||
just --list | ||
|
||
# Reformat all python files in the respository | ||
fmt: | ||
ruff format | ||
ruff --fix | ||
|
||
# Run tests for one or multiple projects within this respository | ||
test +projects=PROJECTS: | ||
#!/usr/bin/env bash | ||
echo "running test target" | ||
for p in {{projects}}; do | ||
echo "for loop: ${p}" | ||
poetry --version | ||
poetry -C ${p}/ install | ||
poetry -C ${p}/ run pytest ${p}/test | ||
done |
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