Skip to content

Commit

Permalink
Add the workflows for unit tests and for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandervelde committed Aug 31, 2024
1 parent 1de3fc7 commit ff9460a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches: [main]
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
name: Run the linter
steps:
- uses: actions/checkout@v3

- name: Set up python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Setup PDM
uses: pdm-project/setup-pdm@v4

- name: Install dependencies
run: pdm install -v

- name: Lint with ruff
run: |
ruff check
29 changes: 29 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
branches: [main]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
name: unit tests
steps:
- uses: actions/checkout@v3

- name: Set up python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Setup PDM
uses: pdm-project/setup-pdm@v4

- name: Install dependencies
run: pdm install -v

- name: Test with pytest
run: |
python -m pytest --cov basic-swerve-sim
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4

0 comments on commit ff9460a

Please sign in to comment.