Skip to content

Commit

Permalink
Github Actions uses fixed job names for branch protection rules (#3677)
Browse files Browse the repository at this point in the history
* 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 <drpatelh@users.noreply.github.com>

* Update .github/workflows/nf-core-linting.yml

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update .github/workflows/code-linting.yml

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* 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 f8e5c94.

* 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 <drpatelh@users.noreply.github.com>
  • Loading branch information
adamrtalbot and drpatelh authored Jul 28, 2023
1 parent 7b0b427 commit 499265b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-linting.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code Linting
name: code-lint
on:
push:
branches: [master]
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
@@ -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/') &&
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/nf-core-linting.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -29,7 +30,7 @@ jobs:

lint:
runs-on: ubuntu-20.04
name: ${{ matrix.tags }}
name: lint
needs: changes
if: needs.changes.outputs.modules != '[]'
strategy:
Expand All @@ -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"

Expand All @@ -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"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: nf-test
run-name: nf-test
on:
push:
branches: [master]
Expand All @@ -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
Expand All @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pytest-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Pytest-workflow
name: pytest
run-name: pytest
on:
push:
branches: [master]
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit 499265b

Please sign in to comment.