-
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.
* create test.yml to run the test only, on PR or push to main * create dev.yml to run the format, lint, and build docs, on PR or push to main * delete the ci.yml and pr.yml * update badge in readme and doca index * remove environtment, so that it run without waiting approval
- Loading branch information
Showing
4 changed files
with
24 additions
and
53 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 |
---|---|---|
@@ -1,34 +1,27 @@ | ||
name: pr | ||
name: Dev | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- "**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
- main | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.11", "3.12"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
dev: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
runs-on: ${{ matrix.os }} | ||
environment: development | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Set up python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
python-version: "3.12" | ||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
with: | ||
|
@@ -41,9 +34,7 @@ jobs: | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root --with docs | ||
- name: Install library | ||
run: poetry install --no-interaction | ||
run: poetry install --no-interaction --no-root --without test --with docs | ||
- name: Activate virtual environment | ||
run: source $VENV | ||
- name: Lint with Ruff | ||
|
@@ -54,17 +45,5 @@ jobs: | |
run: poetry run mypy | ||
- name: Format with Ruff | ||
run: poetry run ruff format --check | ||
- name: Test with pytest | ||
env: | ||
PASTEBIN_API_DEV_KEY: ${{ secrets.PASTEBIN_API_DEV_KEY }} | ||
PASTEBIN_USERNAME: ${{ secrets.PASTEBIN_USERNAME }} | ||
PASTEBIN_PASSWORD: ${{ secrets.PASTEBIN_PASSWORD }} | ||
run: poetry run pytest --cov=src --cov-report=xml | ||
- name: Build docs with Material for MkDocs | ||
run: poetry run mkdocs build | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: 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
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
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