Skip to content

Commit

Permalink
Merge pull request #21 from fusion-energy/develop
Browse files Browse the repository at this point in the history
Simplifying CI
  • Loading branch information
shimwell authored Jul 12, 2021
2 parents 24ec41c + ba3d58e commit 0fea938
Show file tree
Hide file tree
Showing 14 changed files with 144 additions and 386 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci_with_docker_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Builds a dockerimage and then runs tests from within the docker enviroment

name: CI with docker build
on:
pull_request:
branches:
- develop
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Build and test with Docker
run: |
docker build -t paramak --build-arg cq_version=2.1 .
docker run --rm paramak /bin/bash -c "bash run_tests.sh"
29 changes: 29 additions & 0 deletions .github/workflows/ci_with_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

# This CI will lauch a Docker image that contains all the dependencies required
# within that image the pytest test suite is run


name: CI with install

on:
pull_request:
branches:
- develop
- main

jobs:
testing:
runs-on: ubuntu-latest
container:
image: ghcr.io/fusion-energy/paramak:dependencies
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: install package
run: |
python setup.py install
- name: run tests
run: |
bash run_tests.sh
curl -s https://codecov.io/bash
22 changes: 0 additions & 22 deletions .github/workflows/docker_ci_develop.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/docker_ci_main.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This yml file will trigger a Github Action on release creation.
# This Action will build and upload a Docker image to GHCR
# https://github.com/marketplace/actions/publish-docker

name: docker-publish-release

on:
release:
types: [created]

jobs:
build_and_push_dependencies:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push Docker image
uses: docker/build-push-action@v2
with:
push: true
target: dependencies
tags: ghcr.io/fusion-energy/paramak:dependencies
build-args: |
cq_version=2.1
build_and_push_release:
runs-on: ubuntu-latest
needs: build_and_push_dependencies
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push Docker image
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/fusion-energy/paramak
build-args: |
cq_version=2.1
44 changes: 0 additions & 44 deletions .github/workflows/dockerhub-publish-dependencies.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/dockerhub-publish-dev.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/dockerhub-publish-geometry-dependencies.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/dockerhub-publish-stable.yml

This file was deleted.

Loading

0 comments on commit 0fea938

Please sign in to comment.