Skip to content

Commit

Permalink
Merge pull request #235 from EIT-ALIVE/234_run_dash_action_dbodor
Browse files Browse the repository at this point in the history
ci: workflow to run the build of the dashboard
  • Loading branch information
DaniBodor authored Jun 18, 2024
2 parents 1d6b76d + b93a4e1 commit 6af7b93
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 44 deletions.
44 changes: 11 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Python package
name: Build package

on:
push:
branches:
- main
- drcandacemakedamoore/docker
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
Expand Down Expand Up @@ -41,40 +40,19 @@ jobs:
ghcr.io/eit-alive/eittestdata:latest
sh -c 'set -xe ;
cd /ci ;
python -m pip install ".[dev,publishing]" ;
python${{ matrix.python-version }} -m pip install ".[dev,publishing]" ;
pytest -v ;
python -m build'
lint:
if: github.event.pull_request.draft == false
name: Linting build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Python info
shell: bash -l {0}
run: |
which python3
python3 --version
- name: Upgrade pip and install dependencies
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install .[dev,publishing]
- name: Check linting with ruff
run: ruff check .
python${{ matrix.python-version }} -m build'
coveralls:
if: github.event.pull_request.draft == false
name: Coveralls build
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Connect to Container Registry
Expand All @@ -91,12 +69,12 @@ jobs:
-e EIT_PROCESSING_TEST_DATA=/eitprocessing
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
-e COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}
-e COVERALLS_FLAG_NAME=python-${{ matrix.version }}
-e COVERALLS_FLAG_NAME=python-${{ matrix.python-version }}
ghcr.io/eit-alive/eittestdata:latest
sh -c 'set -xe ;
cd /ci ;
python -m pip install --upgrade pip setuptools ;
python -m pip install ".[dev,publishing]" ;
python${{ matrix.python-version }} -m pip install --upgrade pip setuptools ;
python${{ matrix.python-version }} -m pip install ".[dev,publishing]" ;
pytest --cov --cov-append --cov-report xml --cov-report term --cov-report html ;
coveralls --service=github ;
python -m build'
python${{ matrix.python-version }} -m build'
7 changes: 3 additions & 4 deletions .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: cffconvert
name: Citation file

on:
push:
branches:
- main
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- main

jobs:

verify:
if: github.event.pull_request.draft == false
name: "cffconvert"
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/dash_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dashboard

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "**.md"
- "**.rst"
- "**.ipynb"
branches:
- main

jobs:
call-build-workflow:
if: github.event.pull_request.draft == false
name: Build dashboard
uses: EIT-ALIVE/eit_dash/.github/workflows/build.yml@main
with:
caller_branch: ${{ github.head_ref || github.ref_name }}
13 changes: 6 additions & 7 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
name: documentation
name: Documentation
permissions:
contents: write

on:
push:
branches:
- main
- drcandacemakedamoore/improve_docu
- main
- drcandacemakedamoore/improve_docu
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- drcandacemakedamoore/improve_docu
- main
- drcandacemakedamoore/improve_docu

jobs:

build-documentation:
if: github.event.pull_request.draft == false
name: Build documentation
Expand All @@ -26,7 +25,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: "3.10"
- name: Python info
shell: bash -l {0}
run: |
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Linting

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "**.md"
- "**.rst"
- "**.ipynb"
branches:
- main

jobs:
lint:
if: github.event.pull_request.draft == false
name: Linting
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Python info
shell: bash -l {0}
run: |
which python3
python3 --version
- name: Check linting and formatting using ruff
run: |
python3 -m pip install ruff
ruff check || echo "Please ensure you have the latest version of ruff (`ruff -V`) installed locally."
ruff format --check || echo "Please ensure you have the latest version of ruff (`ruff -V`) installed locally."

0 comments on commit 6af7b93

Please sign in to comment.