-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.4 KB
/
pact.yaml
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
name: Cabinet Smart Contracts Continuous Integration
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pact-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install pact
run: |
mkdir -p ${{ github.workspace }}/bin
cd ${{ github.workspace }}/bin
wget https://github.com/kadena-io/pact/releases/download/v4.11.0/pact-4.11.0-linux-20.04.zip
unzip "pact*.zip"
chmod +x pact
- name: Install z3
uses: pavpanchekha/[email protected]
with:
version: "4.8.10"
architecture: "x64"
distribution: "ubuntu-18.04"
- name: List files in pact directory
run: ls -la ${{ github.workspace }}/pact
- name: Verify pact installation
run: |
${{ github.workspace }}/bin/pact --version
- name: Make tests.sh executable
run: chmod +x ${{ github.workspace }}/pact/tests.sh
- name: Run tests.sh script
run: |
cd ${{ github.workspace }}/pact
PACT_BIN=${{ github.workspace }}/bin/pact bash tests.sh > tests.log
echo "Output of tests.sh:"
cat tests.log
str=$(tail -1 tests.log | grep "All files loaded successfully.")
if [ -n "$str" ]; then
exit 0
else
echo "Pact tests failed"
exit 1
fi