diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 67c4c5d..ffbf222 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -43,7 +43,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..02b4706 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,22 @@ +name: sphinxdocs + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Docs and Doctests + # Only check docs on single version + run: | + make docs diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..82dced7 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,22 @@ +name: lint + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Check code formatting + run: | + make lint \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6414dc7..9c0e118 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,9 @@ -name: Python package +name: tests -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: env: primary-python-version: "3.12" @@ -14,7 +17,7 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -34,21 +37,9 @@ jobs: run: | make coverage - - name: Check code formatting - if: matrix.python-version == env.primary-python-version - # Includes flake8, black --check, and isort --check-only - run: | - make lint - - name: Upload to codecov.io # Only upload coverage report for single version if: matrix.python-version == env.primary-python-version - uses: codecov/codecov-action@v1.0.5 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - - - name: Docs and Doctests - # Only check docs on single version - if: matrix.python-version >= env.primary-python-version - run: | - make docs