Skip to content

Workflow file for this run

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