Skip to content

Commit

Permalink
Add QA GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfontaine committed Apr 6, 2024
1 parent bcb33af commit 6a80db5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI
run-name: "CI (${{ github.event_name == 'pull_request' && format('pr: #{0}', github.event.number) || format('{0}: {1}', startsWith(github.event.ref, 'refs/tags') && 'tag' || 'branch', github.ref_name) }})"
on: push
jobs:
nox:
runs-on: ${{ matrix.os }}
strategy:
matrix:
nox_sessions: ["ruff", "tests"]
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12"]
name: ${{ matrix.nox_sessions }} (${{ matrix.python-version }}, ${{ matrix.os }})
steps:
- name: Check the repository out
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
architecture: x64
python-version: ${{ matrix.python-version }}
- name: Install nox and poetry
run: |
pipx install nox poetry
pipx inject nox nox-poetry
pipx inject poetry poetry-plugin-export
- name: Restore nox cache
uses: actions/cache@v4
with:
key: nox-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.nox_sessions }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('noxfile.py') }}
path: .nox
- name: Run ${{ matrix.nox_sessions }} nox session
run: nox -rs ${{ matrix.nox_sessions }}-${{ matrix.python-version }}
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ repos:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.3.5
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
Expand All @@ -44,7 +45,7 @@ repos:
rev: 3.0.38
hooks:
- id: checkov
args: ['--skip-framework', 'dockerfile', '--quiet']
args: ["--skip-framework", "dockerfile", "--quiet"]

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.83.6
Expand Down
2 changes: 1 addition & 1 deletion spacemk/exporters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _save_report_to_file(self, data: dict) -> None:
for key, value in sorted(pivoted_entity_type_data.items()):
worksheet.write(0, column, key)
worksheet.write_column(1, column, value)
column += 1
column += 1 # noqa: SIM113

workbook.close()

Expand Down

0 comments on commit 6a80db5

Please sign in to comment.