Fix to pass tests #661
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: | |
- pablo_dev3 | |
- master | |
- magma_dev | |
- linfeng_dev | |
- geraldine_dev | |
- phreeqc_link | |
- geraldine_dev_new | |
- vinicius_dev | |
- meissam_dev_new | |
- hayley_dev | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
name: [ "Build Bionic", "Build Focal" ] | |
include: | |
- name: "Build Bionic" | |
release: bionic | |
- name: "Build Focal" | |
release: focal | |
steps: | |
- name: Check Out Repo | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: docker/actions/Dockerfile.actions.${{ matrix.release }} | |
push: true | |
tags: icferst/actions:${{ matrix.release }}-${{ github.sha }} | |
testing: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
needs: build | |
if: always() | |
strategy: | |
fail-fast: false | |
matrix: | |
name: [ "Bionic", "Focal"] | |
include: | |
- name: "Bionic" | |
release: bionic | |
command: "make THREADS=2 serialtest-mp-xml" | |
output: "multiphase_test_results.xml" | |
- name: "Focal" | |
release: focal | |
command: "make THREADS=2 serialtest-mp-xml" | |
output: "multiphase_test_results.xml" | |
steps: | |
- name: ${{ matrix.name }} | |
run: | | |
chmod 777 . | |
docker pull icferst/actions:${{ matrix.release }}-${{ github.sha }} | |
docker run -v $PWD:/host icferst/actions:${{ matrix.release }}-${{ github.sha }} /bin/bash -c "${{ matrix.command }} && cp -v ICFERST/tests/${{ matrix.output }} /host/${{ matrix.release }}-${{ matrix.output}}" | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ${{ matrix.release }}-${{ matrix.output }} | |
Report: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
if: always() | |
needs: testing | |
steps: | |
- uses: actions/download-artifact@v2 | |
- name: ${{ matrix.name }} | |
uses: mikepenz/action-junit-report@v2 | |
with: | |
report_paths: './artifact/*-multiphase_test_results.xml' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
check_name: Test report ${{ matrix.release }} | |
fail_on_failure: true |