Skip to content

Set env variables for step and command #16

Set env variables for step and command

Set env variables for step and command #16

Workflow file for this run

name: CI
on:
push:
branches:
- master
- develop
- containerization
pull_request:
jobs:
compile:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: Dockerfile
sparse-checkout-cone-mode: false
- uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
tags: environ
outputs: type=docker,dest=/tmp/environ.tar
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: environ
path: /tmp/environ.tar
test:
needs: compile
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v2
with:
name: environ
path: /tmp
- name: Load image
run: docker load --input /tmp/environ.tar
- name: Run tests
uses: addnab/docker-run-action@v3
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
with:
image: environ:latest
options: -e OMPI_ALLOW_RUN_AS_ROOT=1 -e OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
run: sh -c "cd /app/q-e/Environ/tests && make --ignore-errors run-tests-parallel | tee /app/tests.log && if grep -q **FAILED** /app/tests.log; then exit 1; fi"