-
Notifications
You must be signed in to change notification settings - Fork 15
67 lines (63 loc) · 2.13 KB
/
run_integration_tests_reusable.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Run Integration Tests
on:
workflow_call:
inputs:
cedar_spec_ref:
required: false
default: "main"
type: string
cedar_policy_ref:
required: false
default: "main"
type: string
cedar_integration_tests_ref:
required: false
default: "main"
type: string
jobs:
run_integration_tests:
name: Run integration tests
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
steps:
- name: Checkout cedar-spec
uses: actions/checkout@v4
with:
repository: cedar-policy/cedar-spec
ref: ${{ inputs.cedar_spec_ref }}
path: ./cedar-spec
- name: checkout cedar
uses: actions/checkout@v4
with:
repository: cedar-policy/cedar
path: ./cedar-spec/cedar
ref: ${{ inputs.cedar_policy_ref }}
- name: Delete old integration tests
working-directory: ./cedar-spec/cedar
run: rm -rf cedar-integration-tests # blast the current content
- name: Checkout cedar-integration-tests
uses: actions/checkout@v4
with:
repository: cedar-policy/cedar-integration-tests
ref: ${{ inputs.cedar_integration_tests_ref }}
path: ./cedar-spec/cedar/cedar-integration-tests
- name: Decompress corpus tests
working-directory: ./cedar-spec/cedar/cedar-integration-tests
run: tar xzf corpus-tests.tar.gz
- name: Install Lean
shell: bash
run: |
wget https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh
bash elan-init.sh -y
- name: Prepare Rust build
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build Lean libraries
working-directory: ./cedar-spec/cedar-lean
run: source ~/.profile && ../cedar-drt/build_lean_lib.sh
- name: Run integration tests
working-directory: ./cedar-spec/cedar-drt
shell: bash
run: source ~/.profile && source set_env_vars.sh && cargo test --features "integration-testing" -- --nocapture