diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..c0598cc --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +.github/**/* @OseSem \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f7d210f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,78 @@ +name: CI +on: + push: + branches: + - 'master' + pull_request: + +permissions: + read-all + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + pre-commit: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.11", "3.12" ] + fail-fast: false + steps: + - uses: actions/checkout@v4 + + - name: Run pre-commit + id: pre-commit + uses: pre-commit/action@v3.0.1 + + pyright: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.11", "3.12" ] + fail-fast: false + continue-on-error: ${{ matrix.experimental }} + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + cache: 'pip' + python-version: ${{ matrix.python-version }} + - run: pip install -r requirements.txt + + + - name: Run Pyright (Linux) + uses: jakebailey/pyright-action@v2.2.1 + with: + pylance-version: latest-release + python-platform: "Linux" + python-version: ${{ matrix.python-version }} + warnings: true + + - name: Run Pyright (Windows) + uses: jakebailey/pyright-action@v2.2.1 + with: + pylance-version: latest-release + python-platform: "Windows" + python-version: ${{ matrix.python-version }} + warnings: true + + check: # This job does nothing and is only used for the branch protection + if: always() + needs: + - pre-commit + - pyright + + runs-on: ubuntu-latest + + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@v1.2.2 + with: + jobs: ${{ toJSON(needs) }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 17a33c1..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Lint - -on: - push: - branches: - - 'master' - pull_request: - merge_group: - -permissions: - read-all - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -defaults: - run: - shell: bash - -jobs: - lint: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Run pre-commit - id: pre-commit - uses: pre-commit/action@v3.0.0