Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0022976
Merge pull request #111 from Czarified/main
Czarified Jan 13, 2025
20aa36c
Updating all dependencies.
Czarified Jan 13, 2025
e7bd30b
Comment out the safety nox session.
Czarified Jan 14, 2025
46e3e2d
Moving the nox runs in test workflow to use the github action and sec…
Czarified Jan 14, 2025
2894b78
Does reording the name make it work?
Czarified Jan 14, 2025
8a423e4
Just drop it from the nox session.
Czarified Jan 14, 2025
6f06770
Forgot to run pre-commit... 😅
Czarified Jan 14, 2025
da923d2
Add all the extra setup steps for safetycli venv.
Czarified Jan 14, 2025
913510b
Uncomment safety.
Czarified Jan 14, 2025
e3e9eb7
Test Path.
Czarified Jan 15, 2025
557fcc2
Did I delete the slash?
Czarified Jan 15, 2025
cce3623
Debugging directory
Czarified Jan 15, 2025
9c6f16b
Trying to list tests dir.
Czarified Jan 15, 2025
e37aed4
Nope. Try again
Czarified Jan 15, 2025
6b41e49
Why is coverage not writing the file?
Czarified Jan 15, 2025
fec12f5
Adding verbosity to coverage
Czarified Jan 15, 2025
42a4df8
Verbosity was a bad idea
Czarified Jan 15, 2025
1ed6669
Trying some coverage debug options.
Czarified Jan 20, 2025
cd2e609
Trying an ls with wildcard.
Czarified Jan 20, 2025
c74b87c
Am I in the wrong directory?
Czarified Jan 20, 2025
171dddb
Will a directory wildcard save us?
Czarified Jan 20, 2025
c6bcd91
List all the shit.
Czarified Jan 20, 2025
382470b
Trying two levels down with wildcard.
Czarified Jan 20, 2025
711f41f
Fuselage and Station classes.
Czarified Jan 20, 2025
ae61cd4
Include hidden files in coverage upload and error if no coverage data…
ianblackshere Jan 20, 2025
24ce5a2
Added Station methods.
Czarified Jan 20, 2025
8bdaa88
Merge pull request #114 from Czarified/113-upload-artifacts-failing-i…
Czarified Jan 20, 2025
50d70b1
Bumping version.
Czarified Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@ jobs:
- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
pipx inject poetry poetry-plugin-export
poetry --version

- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"

- name: Run Safety CLI to check for vulnerabilities
uses: pyupio/safety-action@v1
with:
api-key: ${{ secrets.SAFETY_API_KEY }}
args: --detailed-output

- name: Detect and tag new version
id: check-version
if: steps.check-parent-commit.outputs.sha
Expand Down
56 changes: 53 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
include:
- { python: "3.12", os: "ubuntu-latest", session: "pre-commit" }
- { python: "3.12", os: "ubuntu-latest", session: "safety" }
# - { python: "3.12", os: "ubuntu-latest", session: "safety" }
- { python: "3.12", os: "ubuntu-latest", session: "mypy" }
- { python: "3.11", os: "ubuntu-latest", session: "mypy" }
- { python: "3.10", os: "ubuntu-latest", session: "mypy" }
Expand Down Expand Up @@ -101,8 +101,10 @@ jobs:
if: always() && matrix.session == 'tests'
uses: "actions/upload-artifact@v4"
with:
name: coverage-data-${{ matrix.python}}-${{ matrix.os }}
path: ".coverage.*"
name: coverage-data-${{matrix.python}}-${{matrix.os}}
include-hidden-files: true
path: .coverage.*
if-no-files-found: error

- name: Upload documentation
if: matrix.session == 'docs-build'
Expand All @@ -111,6 +113,53 @@ jobs:
name: docs
path: docs/_build

safety:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip "pipx==1.4.3"
pip --version

- name: Upgrade pip in virtual environments
shell: python
run: |
import os
import pip

with open(os.environ["GITHUB_ENV"], mode="a") as io:
print(f"VIRTUALENV_PIP={pip.__version__}", file=io)

- name: Install Poetry
shell: bash
run: |
pipx --version
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
pipx inject poetry poetry-plugin-export
poetry --version

- name: Install Nox
shell: bash
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry
nox --version

- name: Run Safety CLI to check for vulnerabilities
uses: pyupio/safety-action@v1
with:
api-key: ${{ secrets.SAFETY_API_KEY }}
args: --detailed-output

coverage:
runs-on: ubuntu-latest
needs: tests
Expand All @@ -131,6 +180,7 @@ jobs:
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
pipx inject poetry poetry-plugin-export
poetry --version

- name: Install Nox
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
entry: end-of-file-fixer
language: system
types: [text]
stages: [commit, push, manual]
stages: [pre-commit, pre-push, manual]
- id: flake8
name: flake8
entry: flake8
Expand All @@ -59,7 +59,7 @@ repos:
entry: trailing-whitespace-fixer
language: system
types: [text]
stages: [commit, push, manual]
stages: [pre-commit, pre-push, manual]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.0
hooks:
Expand Down
11 changes: 9 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def safety(session: Session) -> None:
"""Scan dependencies for insecure packages."""
requirements = session.poetry.export_requirements()
session.install("safety")
session.run("safety", "check", "--full-report", f"--file={requirements}")
session.run("safety", "scan", "--full-report", f"--file={requirements}")


@session(python=python_versions)
Expand All @@ -164,7 +164,14 @@ def tests(session: Session) -> None:
session.install(".")
session.install("coverage[toml]", "pytest", "pygments")
try:
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
session.run(
"coverage",
"run",
"--parallel",
"-m",
"pytest",
*session.posargs,
)
finally:
if session.interactive:
session.notify("coverage", posargs=[])
Expand Down
Loading
Loading