-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the workflows for unit tests and for linting
- Loading branch information
1 parent
1de3fc7
commit ff9460a
Showing
2 changed files
with
55 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,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 |
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,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 |