Skip to content

Commit

Permalink
Seperate style check into its own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Sep 12, 2024
1 parent 6862bbf commit ed7612b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/fmu-ensemble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: git fetch --unshallow --tags

- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -59,12 +59,6 @@ jobs:
- name: 🧾 List all installed packages
run: pip freeze

- name: 🕵️ Check code style
env:
SKIP: no-commit-to-branch
run: |
pre-commit run --all-files
- name: 🤖 Run tests
run: |
python -c "import fmu.ensemble"
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: style

on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- published

jobs:
fmu-ensemble:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- name: 📖 Checkout commit locally
uses: actions/checkout@v4

- name: 📖 Checkout tags
# This seems necessary for setuptools_scm to be able to infer
# the correct version.
run: git fetch --unshallow --tags

- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: 📦 Install fmu-ensemble with style dependencies
run: |
pip install ".[style]"
- name: 🕵️ Check code style
env:
SKIP: no-commit-to-branch
run: |
pre-commit run --all-files

0 comments on commit ed7612b

Please sign in to comment.