diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..2f60259 --- /dev/null +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..3ef985e --- /dev/null +++ b/.github/workflows/tests.yml @@ -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