From 499265b27ba02a9805761c5c980556f2525d52dd Mon Sep 17 00:00:00 2001 From: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> Date: Fri, 28 Jul 2023 14:36:21 +0100 Subject: [PATCH] Github Actions uses fixed job names for branch protection rules (#3677) * Add wait-for-status workflow * Rename and tidy all GHA workflows for branch protection * Changing some stuff to kick off real CI/CD * Apply suggestions from code review Co-authored-by: Harshil Patel * Update .github/workflows/nf-core-linting.yml Co-authored-by: Harshil Patel * Update .github/workflows/code-linting.yml Co-authored-by: Harshil Patel * Update nf-core-linting.yml * Update nf-core-linting.yml * Update nf-core-linting.yml * Add FASTQC fake test * Revert "Changing some stuff to kick off real CI/CD" This reverts commit f8e5c941ef2120fd646643a88fd9b51074a02f01. * Change to fix-linting for consistency * Remove fake nf-test change * Delete main.nf.test * Bump setup-python version to v4 --------- Co-authored-by: Harshil Patel --- .github/workflows/code-linting.yml | 2 +- .github/workflows/fix-linting.yml | 5 +++-- .github/workflows/nf-core-linting.yml | 11 ++++++----- .github/workflows/nf-test.yml | 8 ++++---- .github/workflows/pytest-workflow.yml | 12 ++++++------ 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/code-linting.yml b/.github/workflows/code-linting.yml index c115bce460f..831453f8ea2 100644 --- a/.github/workflows/code-linting.yml +++ b/.github/workflows/code-linting.yml @@ -1,4 +1,4 @@ -name: Code Linting +name: code-lint on: push: branches: [master] diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml index 3c732388425..8558ceef715 100644 --- a/.github/workflows/fix-linting.yml +++ b/.github/workflows/fix-linting.yml @@ -1,10 +1,11 @@ -name: Fix linting from a comment +name: fix-linting +run-name: fix linting (automated) on: issue_comment: types: [created] jobs: - deploy: + fix-linting: # Only run if comment is on a PR with the main repo, and if it contains the magic keywords if: > contains(github.event.comment.html_url, '/pull/') && diff --git a/.github/workflows/nf-core-linting.yml b/.github/workflows/nf-core-linting.yml index 47a6d2aa388..123decf27e6 100644 --- a/.github/workflows/nf-core-linting.yml +++ b/.github/workflows/nf-core-linting.yml @@ -1,4 +1,5 @@ -name: nf-core linting +name: nf-core-lint +run-name: nf-core-lint # This workflow is triggered on pushes and PRs to the repository. # It runs the `nf-core lint` tests to ensure that the module code meets the nf-core guidelines on: @@ -14,7 +15,7 @@ concurrency: jobs: changes: - name: Check for changes + name: check-changes runs-on: ubuntu-latest outputs: # Expose matched filters as job 'modules' output variable @@ -29,7 +30,7 @@ jobs: lint: runs-on: ubuntu-20.04 - name: ${{ matrix.tags }} + name: lint needs: changes if: needs.changes.outputs.modules != '[]' strategy: @@ -40,7 +41,7 @@ jobs: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.x" @@ -52,7 +53,7 @@ jobs: ${{ runner.os }}-pip- - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.x" diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 7c728cc15e9..57df4fef4c2 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -1,4 +1,5 @@ name: nf-test +run-name: nf-test on: push: branches: [master] @@ -15,7 +16,7 @@ concurrency: jobs: changes: - name: Check for changes + name: check-changes runs-on: ubuntu-latest outputs: # Expose matched filters as job 'modules' output variable @@ -28,10 +29,9 @@ jobs: with: filters: "tests/config/nftest_modules.yml" - test: + nf-test: runs-on: ubuntu-20.04 - - name: ${{ matrix.tags }} ${{ matrix.profile }} + name: nf-test needs: changes if: needs.changes.outputs.modules != '[]' strategy: diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 38dfba8c6da..dcfe6db7cf0 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -1,4 +1,5 @@ -name: Pytest-workflow +name: pytest +run-name: pytest on: push: branches: [master] @@ -15,7 +16,7 @@ concurrency: jobs: changes: - name: Check for changes + name: check-changes runs-on: ubuntu-latest outputs: # Expose matched filters as job 'modules' output variable @@ -28,10 +29,9 @@ jobs: with: filters: "tests/config/pytest_modules.yml" - test: + pytest: runs-on: ubuntu-20.04 - - name: ${{ matrix.tags }} ${{ matrix.profile }} + name: pytest needs: changes if: needs.changes.outputs.modules != '[]' strategy: @@ -157,7 +157,7 @@ jobs: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.x"