Skip to content

Partner Chains Smart Contracts CI #440

Partner Chains Smart Contracts CI

Partner Chains Smart Contracts CI #440

Workflow file for this run

name: 'Partner Chains Smart Contracts CI'
on:
pull_request:
push:
branches:
- master
- develop
workflow_dispatch:
env:
AWS_DEFAULT_REGION: eu-central-1
jobs:
build-x64-linux:
permissions:
id-token: write
contents: read
runs-on: [ self-hosted, Linux ]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: Add signing key for nix
run: echo "${{ secrets.NIX_SIGNING_KEY }}" > "${{ runner.temp }}/nix-key"
- name: Cache cabal directories
uses: actions/cache@v4
with:
path: |
~/.local/state/cabal/store
~/.cabal/store
offchain/dist-newstyle
key: ${{ runner.os }}-${{ hashFiles('**/*.cabal', '**/cabal.project' }}

Check failure on line 35 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / Partner Chains Smart Contracts CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 35, Col: 16): Unexpected end of expression: ''**/cabal.project''. Located at position 25 within expression: hashFiles('**/*.cabal', '**/cabal.project'
restore-keys: ${{ runner.os }}-
- name: Build onchain
run: |
cd onchain
nix develop --command "make"
- name: Build offchain
run: |
cd offchain
nix develop --command "make"
- name: Acquire AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Copy nix scopes to nix cache
run: |
nix-store --stdin -q --deriver < ${{ runner.temp }}/outputs | nix-store --stdin -qR --include-outputs \
| nix copy --stdin --to \
"s3://cache.sc.iog.io?secret-key=${{ runner.temp }}/nix-key&region=$AWS_DEFAULT_REGION" \
&& rm ${{ runner.temp }}/outputs
test-x64-linux:
permissions:
id-token: write
contents: read
runs-on: [ self-hosted, Linux ]
needs:
- build-x64-linux
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ github.token }}
- name: Run tests
run: |
cd offchain
nix-shell --run "make test"