Skip to content

Commit

Permalink
Adding GitHub content protection rule to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Sep 2, 2024
1 parent 6fd89e1 commit 2940305
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ name: black

on: [push, pull_request]

permissions:
contents: read

# use workaround due to: https://github.com/psf/black/issues/2079#issuecomment-812359146
jobs:
check-formatting:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Black
run: pip install 'black==22.6.0'
- name: Run black --check .
run: black --check .
check-formatting:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Black
run: pip install 'black==22.6.0'
- name: Run black --check .
run: black --check .
3 changes: 3 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Coverage

permissions:
contents: read

on:
push:
branches:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/licensechecker.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Check License Lines

permissions:
contents: read

on: [push, pull_request]

jobs:
check-license-lines:
runs-on: ubuntu-24.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Linting

permissions:
contents: read

on: [push, pull_request]

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/mac_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: ARMI MacOS Tests

permissions:
contents: read

on:
push:
paths-ignore:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: ARMI unit tests

permissions:
contents: read

on:
push:
paths-ignore:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/validatemanifest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Validate Manifest

permissions:
contents: read

on: [push, pull_request]

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/wintests.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: ARMI Windows tests

permissions:
contents: read

on:
push:
paths-ignore:
Expand Down

0 comments on commit 2940305

Please sign in to comment.