-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (41 loc) · 1.61 KB
/
test_all.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Run All Unit Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
compile_job:
name: test_all
runs-on: ubuntu-latest
container:
image: ghcr.io/lasp/adamant:example-latest
env:
INSTALL_DIR: /home/user/env
ADAMANT_DIR: ${{ github.workspace }}
ADAMANT_CONFIGURATION_YAML: ${{ github.workspace }}/config/adamant.configuration.yaml
steps:
- run: echo "Starting job triggered by a ${{ github.event_name }} event on a ${{ runner.os }} server hosted by GitHub."
- run: echo "Checking out ${{ github.repository }} on branch ${{ github.ref }}."
- name: Check out repository code
uses: actions/checkout@v3
- name: Mark repository as safe so we can run git commands within it
run: git config --global --add safe.directory $ADAMANT_DIR
- name: Get alire dependencies
run: alr -n build --release && alr -n toolchain --select gnat_native && alr -n toolchain --select gprbuild
- name: Set up Adamant configuration file
run: cp config/adamant.configuration.yaml.original config/adamant.configuration.yaml
- name: Run all unit tests
run: bash env/github_run.sh "redo test_all"
- name: Archive logs for failed unit tests
if: always() # Make sure this runs even if `redo test_all` fails
uses: actions/upload-artifact@v3
with:
name: failed_test_logs
path: ${{ github.workspace }}/build/failed_test_logs
if-no-files-found: ignore
- run: echo "Finished with status - ${{ job.status }}."
if: always()