From 55bb9c4aad961e55ea8ca042a9e1b0b200005dd3 Mon Sep 17 00:00:00 2001 From: J Dark Date: Wed, 18 Oct 2023 08:12:58 -0400 Subject: [PATCH 1/6] fix for conda workflow --- .github/workflows/ci.yml | 67 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 682bdeebc..4f1909293 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,40 +2,41 @@ name: CI on: [pull_request, push] jobs: - # run-on-conda: - # runs-on: ubuntu-latest - - # steps: - # - name: Checkout code - # uses: actions/checkout@v2 - - # - name: Set up Conda - # uses: conda-incubator/setup-miniconda@v2 - # with: - # activate-environment: myenv - # mamba-version: "*" - # channels: conda-forge, defaults - - # - name: Create Conda environment - # shell: bash -l {0} - # run: | - # mamba install -c conda-forge fenics-dolfinx - - # - name: Install local package and dependencies - # shell: bash -l {0} - # run: | - # pip install .[test] - - # - name: Run tests - # shell: bash -l {0} - # run: | - # pytest test/ --cov festim --cov-report xml --cov-report term + run-on-conda: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: myenv + miniforge-version: latest + use-mamba: true + channels: conda-forge + + - name: Create Conda environment + shell: bash -l {0} + run: | + mamba install -c conda-forge fenics-dolfinx + + - name: Install local package and dependencies + shell: bash -l {0} + run: | + pip install .[test] + + - name: Run tests + shell: bash -l {0} + run: | + pytest test/ --cov festim --cov-report xml --cov-report term - # - name: Upload to codecov - # uses: codecov/codecov-action@v3 - # with: - # token: ${{ secrets.CODECOV_TOKEN }} - # files: ./coverage.xml + - name: Upload to codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml run-on-docker: runs-on: ubuntu-latest From 5b857259ab3cb1018076a394b58e27510a9fee9d Mon Sep 17 00:00:00 2001 From: J Dark Date: Wed, 18 Oct 2023 08:33:04 -0400 Subject: [PATCH 2/6] add status badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3041bb52e..1c7ac8064 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FESTIM - -[![CircleCI](https://dl.circleci.com/status-badge/img/gh/RemDelaporteMathurin/FESTIM/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/RemDelaporteMathurin/FESTIM/tree/main) +[![conda CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/conda_ci.yml/badge.svg?event=push)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/conda_ci.yml) +[![docker CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/docker_ci.yml/badge.svg?event=push)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/docker_ci.yml) [![codecov](https://codecov.io/gh/RemDelaporteMathurin/FESTIM/branch/master/graph/badge.svg?token=AK3A9CV2D3)](https://codecov.io/gh/RemDelaporteMathurin/FESTIM) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black) ![GitHub stars](https://img.shields.io/github/stars/RemDelaporteMathurin/FESTIM.svg?logo=github&label=Stars&logoColor=white) From d7d79c176b3ab30a8a855e1ab698920220d42bfe Mon Sep 17 00:00:00 2001 From: J Dark Date: Wed, 18 Oct 2023 08:37:19 -0400 Subject: [PATCH 3/6] show from fenicsx branch --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1c7ac8064..3aaac35d0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FESTIM -[![conda CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/conda_ci.yml/badge.svg?event=push)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/conda_ci.yml) -[![docker CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/docker_ci.yml/badge.svg?event=push)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/docker_ci.yml) +[![conda CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/conda_ci.yml/badge.svg?branch=fenicsx)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/conda_ci.yml) +[![docker CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/docker_ci.yml/badge.svg?branch=fenicsx)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/docker_ci.yml) [![codecov](https://codecov.io/gh/RemDelaporteMathurin/FESTIM/branch/master/graph/badge.svg?token=AK3A9CV2D3)](https://codecov.io/gh/RemDelaporteMathurin/FESTIM) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black) ![GitHub stars](https://img.shields.io/github/stars/RemDelaporteMathurin/FESTIM.svg?logo=github&label=Stars&logoColor=white) From 2249601aa15320133c01038f5072fc813e1cb0cf Mon Sep 17 00:00:00 2001 From: J Dark Date: Wed, 18 Oct 2023 10:14:03 -0400 Subject: [PATCH 4/6] split ci workflow --- .github/workflows/{ci.yml => ci_conda.yml} | 23 +-------------------- .github/workflows/ci_docker.yml | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 22 deletions(-) rename .github/workflows/{ci.yml => ci_conda.yml} (61%) create mode 100644 .github/workflows/ci_docker.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci_conda.yml similarity index 61% rename from .github/workflows/ci.yml rename to .github/workflows/ci_conda.yml index 4f1909293..46e3467cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci_conda.yml @@ -1,4 +1,4 @@ -name: CI +name: Conda-CI on: [pull_request, push] jobs: @@ -37,24 +37,3 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml - - run-on-docker: - runs-on: ubuntu-latest - container: dolfinx/dolfinx:stable - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install local package and dependencies - run: | - pip install .[test] - - - name: Run tests - run: | - python3 -m pytest test/ --cov festim --cov-report xml --cov-report term - - - name: Upload to codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml diff --git a/.github/workflows/ci_docker.yml b/.github/workflows/ci_docker.yml new file mode 100644 index 000000000..4a24f6282 --- /dev/null +++ b/.github/workflows/ci_docker.yml @@ -0,0 +1,24 @@ +name: Docker CI +on: [pull_request, push] + +jobs: + run-on-docker: + runs-on: ubuntu-latest + container: dolfinx/dolfinx:stable + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install local package and dependencies + run: | + pip install .[test] + + - name: Run tests + run: | + python3 -m pytest test/ --cov festim --cov-report xml --cov-report term + + - name: Upload to codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml \ No newline at end of file From 73d94de88ba642a31c862d92624eb33c3eaac623 Mon Sep 17 00:00:00 2001 From: J Dark Date: Wed, 18 Oct 2023 10:17:14 -0400 Subject: [PATCH 5/6] refactoring --- .github/workflows/ci_conda.yml | 4 ++-- .github/workflows/ci_docker.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_conda.yml b/.github/workflows/ci_conda.yml index 46e3467cc..4151edba9 100644 --- a/.github/workflows/ci_conda.yml +++ b/.github/workflows/ci_conda.yml @@ -1,8 +1,8 @@ -name: Conda-CI +name: Conda CI on: [pull_request, push] jobs: - run-on-conda: + run-tests: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/ci_docker.yml b/.github/workflows/ci_docker.yml index 4a24f6282..2be23e550 100644 --- a/.github/workflows/ci_docker.yml +++ b/.github/workflows/ci_docker.yml @@ -2,7 +2,7 @@ name: Docker CI on: [pull_request, push] jobs: - run-on-docker: + run-tests: runs-on: ubuntu-latest container: dolfinx/dolfinx:stable steps: From 43d5c1811909e8a781b9b1757cae53bcbf9f7a75 Mon Sep 17 00:00:00 2001 From: J Dark Date: Wed, 18 Oct 2023 10:19:53 -0400 Subject: [PATCH 6/6] update with new workflows --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3aaac35d0..f25ebc3b2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FESTIM -[![conda CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/conda_ci.yml/badge.svg?branch=fenicsx)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/conda_ci.yml) -[![docker CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/docker_ci.yml/badge.svg?branch=fenicsx)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/docker_ci.yml) +[![Conda CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/ci_conda.yml/badge.svg?branch=fenicsx)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/ci_conda.yml) +[![Docker CI](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/ci_docker.yml/badge.svg?branch=fenicsx)](https://github.com/RemDelaporteMathurin/FESTIM/actions/workflows/ci_docker.yml) [![codecov](https://codecov.io/gh/RemDelaporteMathurin/FESTIM/branch/master/graph/badge.svg?token=AK3A9CV2D3)](https://codecov.io/gh/RemDelaporteMathurin/FESTIM) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black) ![GitHub stars](https://img.shields.io/github/stars/RemDelaporteMathurin/FESTIM.svg?logo=github&label=Stars&logoColor=white)