diff --git a/.github/workflows/pr.yaml b/.github/workflows/on-merge.yaml similarity index 82% rename from .github/workflows/pr.yaml rename to .github/workflows/on-merge.yaml index 96a315d61..67f58aa27 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/on-merge.yaml @@ -1,24 +1,10 @@ -name: Pull Request +name: Testing (main) on: - pull_request: - paths-ignore: - - 'docs/**' - - '*.md' - - '*.rst' - - '*.txt' - - '*.html' - - '*.css' - - '*.js' - - '*.png' - - '*.jpg' - - '*.jpeg' - - '*.gif' - - '*.svg' - - '*.example' push: branches: - main + - release-candidate/* paths-ignore: - 'docs/**' - '*.md' @@ -35,13 +21,15 @@ on: - '*.example' workflow_dispatch: {} +permissions: {} + concurrency: group: 'ci-${{ github.workflow }}-${{ github.ref }}' cancel-in-progress: true jobs: linting: - uses: './.github/workflows/lint.yaml' + uses: './.github/workflows/testing-lint.yaml' unit-tests: uses: './.github/workflows/testing-unit.yaml' @@ -57,7 +45,7 @@ jobs: secrets: inherit needs: unit-tests - testing-install: + install-tests: uses: './.github/workflows/testing-install.yaml' secrets: inherit diff --git a/.github/workflows/on-pr-dep-change.yaml b/.github/workflows/on-pr-dep-change.yaml new file mode 100644 index 000000000..84fb90ae2 --- /dev/null +++ b/.github/workflows/on-pr-dep-change.yaml @@ -0,0 +1,19 @@ +name: Testing (PR - Dependency Change) + +on: + pull_request: + paths: + - 'pyproject.toml' + - 'poetry.lock' + workflow_dispatch: {} + +permissions: {} + +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true + +jobs: + dependency-tests: + uses: './.github/workflows/testing-dependency.yaml' + secrets: inherit diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml new file mode 100644 index 000000000..c686254f1 --- /dev/null +++ b/.github/workflows/on-pr.yaml @@ -0,0 +1,38 @@ +name: Testing (PR) + +on: + pull_request: + paths-ignore: + - 'docs/**' + - '*.md' + - '*.rst' + - '*.txt' + - '*.html' + - '*.css' + - '*.js' + - '*.png' + - '*.jpg' + - '*.jpeg' + - '*.gif' + - '*.svg' + - '*.example' + workflow_dispatch: {} + +permissions: {} + +concurrency: + group: 'ci-${{ github.workflow }}-${{ github.ref }}' + cancel-in-progress: true + +jobs: + linting: + uses: './.github/workflows/testing-lint.yaml' + + unit-tests: + uses: './.github/workflows/testing-unit.yaml' + secrets: inherit + + integration-tests: + uses: './.github/workflows/testing-integration.yaml' + secrets: inherit + needs: unit-tests diff --git a/.github/workflows/alpha-release.yaml b/.github/workflows/release-dev.yaml similarity index 72% rename from .github/workflows/alpha-release.yaml rename to .github/workflows/release-dev.yaml index fe27a4fdb..2db2b96e5 100644 --- a/.github/workflows/alpha-release.yaml +++ b/.github/workflows/release-dev.yaml @@ -23,23 +23,11 @@ on: type: string default: 'rc1' +permissions: + contents: write jobs: - # unit-tests: - # uses: './.github/workflows/testing-unit.yaml' - # secrets: inherit - # integration-tests: - # uses: './.github/workflows/testing-integration.yaml' - # secrets: inherit - # dependency-tests: - # uses: './.github/workflows/testing-dependency.yaml' - # secrets: inherit - pypi: uses: './.github/workflows/publish-to-pypi.yaml' - # needs: - # - unit-tests - # - integration-tests - # - dependency-tests with: isPrerelease: true ref: ${{ inputs.ref }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release-prod.yaml similarity index 87% rename from .github/workflows/release.yaml rename to .github/workflows/release-prod.yaml index 6889c4840..540a858fb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release-prod.yaml @@ -18,6 +18,9 @@ on: - 'minor' # new features, backwards compatible - 'major' # breaking changes +permissions: + contents: write + jobs: unit-tests: uses: './.github/workflows/testing-unit.yaml' @@ -28,13 +31,18 @@ jobs: dependency-tests: uses: './.github/workflows/testing-dependency.yaml' secrets: inherit + needs: unit-tests + install-tests: + uses: './.github/workflows/testing-install.yaml' + secrets: inherit pypi: uses: './.github/workflows/publish-to-pypi.yaml' - needs: + needs: - unit-tests - integration-tests - dependency-tests + - install-tests with: isPrerelease: false ref: ${{ inputs.ref }} @@ -48,5 +56,5 @@ jobs: docs-publish: uses: './.github/workflows/build-and-publish-docs.yaml' secrets: inherit - needs: + needs: - pypi diff --git a/.github/workflows/lint.yaml b/.github/workflows/testing-lint.yaml similarity index 90% rename from .github/workflows/lint.yaml rename to .github/workflows/testing-lint.yaml index 961935891..d86e9b6b5 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/testing-lint.yaml @@ -2,6 +2,8 @@ name: "Lint" on: workflow_call: {} +permissions: {} + jobs: lint: runs-on: ubuntu-latest