diff --git a/.github/workflows/fmu-ensemble.yml b/.github/workflows/fmu-ensemble.yml index 1892726c..cec954d1 100644 --- a/.github/workflows/fmu-ensemble.yml +++ b/.github/workflows/fmu-ensemble.yml @@ -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 }} @@ -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" diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 00000000..978df765 --- /dev/null +++ b/.github/workflows/style.yml @@ -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