Refactor ci #8
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: 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 container | |
run: docker run --interactive --name ci-environ environ | |
- name: Run tests | |
run: docker exec -it ci-environ sh -c "cd /app/q-e/Environ/tests && make --ignore-errors run-tests-parallel" |