diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e77ba22 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: test & lint + +on: + push: + branches: + - '*' + pull_request: + types: [opened, reopened] + workflow_dispatch: + +jobs: + pytest: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dev dependencies + run: 'pip install .[dev]' + - name: Run tests + run: 'pytest -v' + + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dev dependencies + run: 'pip install .[dev]' + - name: Run linter + run: 'ruff check' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 587f802..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Run tests - -on: - push: - branches: - - '*' - pull_request: - types: [opened, reopened] - workflow_dispatch: - -jobs: - pytest: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - run: 'pip install .[dev]' - - run: 'pytest -v'