diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..dab06ae --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,44 @@ +name: Lint +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 + + pyright: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + cache: 'pip' + + - run: | + python -m venv .venv + source .venv/bin/activate + pip install -e '.[test,cli]' + + - run: echo "$PWD/.venv/bin" >> $GITHUB_PATH + - uses: jakebailey/pyright-action@v2 + + tests: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9, 3.10, 3.11, 3.12] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + cache: 'pip' + python-version: ${{ matrix.python-version }} + + - run: | + python -m venv .venv + source .venv/bin/activate + pip install -e '.[test,cli]' + + - run: echo "$PWD/.venv/bin" >> $GITHUB_PATH + - run: pytest \ No newline at end of file diff --git a/.github/workflows/pyright.yml b/.github/workflows/pyright.yml deleted file mode 100644 index bfad777..0000000 --- a/.github/workflows/pyright.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Pyright -on: [push, pull_request] -jobs: - pyright: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - cache: 'pip' - - - run: | - python -m venv .venv - source .venv/bin/activate - pip install -e '.[test,cli]' - - - run: echo "$PWD/.venv/bin" >> $GITHUB_PATH - - uses: jakebailey/pyright-action@v2 diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml deleted file mode 100644 index b268138..0000000 --- a/.github/workflows/ruff.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: Ruff -on: [push, pull_request] -jobs: - ruff: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: chartboost/ruff-action@v1