ci: Create GHA workflows for unit test and linting #4
Workflow file for this run
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
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 sync -d -G test | |
- name: Test with pytest | |
run: | | |
python -m pytest --cov basic-swerve-sim | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 |