-
Notifications
You must be signed in to change notification settings - Fork 100
50 lines (43 loc) · 1.35 KB
/
sigma-prime.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
42
43
44
45
46
47
48
49
50
on:
push:
branches:
- master
pull_request:
name: Sigma Prime security testing
jobs:
sigma-prime:
runs-on: [self-hosted, heavy]
name: Sigma Prime security testing
steps:
- name: Install LFS
run: apt-get install git-lfs
- name: Clone the repository
uses: actions/checkout@v3
with:
lfs: 'true'
- name: Clone sigma prime security testing repository
uses: actions/checkout@v2
with:
repository: aurora-is-near/sigma-prime-security-testing
ssh-key: ${{ secrets.SIGMA_PRIME_REPO_SSH_KEY }}
path: sigma-prime/tests
- name: Construct docker image name
run: |
runner_name_lower=$(echo $RUNNER_NAME | tr '[:upper:]' '[:lower:]')
testing_image_name="sigma-prime-testing-${runner_name_lower}"
echo "TESTING_IMAGE_NAME=${testing_image_name}" >> $GITHUB_ENV
- name: Build docker image
run: |
docker build \
-f sigma-prime/tests/Dockerfile \
-t "$TESTING_IMAGE_NAME" \
./sigma-prime
- name: Run tests
run: |
docker run \
--rm \
-v "$(pwd)/.:/repo/rainbow-bridge" \
"$TESTING_IMAGE_NAME"
- name: Remove docker image
if: ${{ always() }}
run: docker rmi "$TESTING_IMAGE_NAME" || true