Skip to content

add basic ci pipelines. closes #14 #1

add basic ci pipelines. closes #14

add basic ci pipelines. closes #14 #1

Workflow file for this run

name: "E2E testing"
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
docker-images:
name: "Build Docker images"
runs-on: ubuntu-latest
strategy:
matrix:
docker-images:
- { name: "ghcr.io/cosmos/interchain-attestation-simapp", path: "testing/simapp.Dockerfile" }
- { name: "ghcr.io/cosmos/interchain-attestation-rollupsimapp", path: "testing/rollupsimapp.Dockerfile" }
- { name: "ghcr.io/cosmos/interchain-attestation-sidecar", path: "testing/sidecar.Dockerfile" }
- { name: "ghcr.io/cosmos/interchain-attestation-mock-da", path: "testing/mock-da.Dockerfile" }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5 # Useful because the docker builds caches the go modules
with:
go-version: 1.23
cache-dependency-path: |
core/go.sum
configmodule/go.sum
sidecar/go.sum
testing/interchaintest/go.sum
testing/simapp/go.sum
testing/rollupsimapp/go.sum
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# TODO: Any nicer way to do this? :P
- name: Set Tags
run: |

Check failure on line 44 in .github/workflows/e2e.yaml

View workflow run for this annotation

GitHub Actions / E2E testing

Invalid workflow file

The workflow is not valid. .github/workflows/e2e.yaml (Line: 44, Col: 16): Unrecognized named-value: 'SHORT_SHA'. Located at position 1 within expression: SHORT_SHA .github/workflows/e2e.yaml (Line: 58, Col: 19): Unrecognized named-value: 'COMMIT_TAG'. Located at position 1 within expression: COMMIT_TAG
echo "COMMIT_TAG=${{ matrix.docker-images.name }}:${{ SHORT_SHA }}" >> $GITHUB_ENV
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
echo "LATEST_TAG=${{ matrix.docker-images.name }}:latest" >> $GITHUB_ENV
else
echo "LATEST_TAG=" >> $GITHUB_ENV
fi
- name: Build
uses: docker/build-push-action@v6
with:
push: true
context: . # Even though the docker images are in the testing directory, they need the root context
file: ${{ matrix.docker-images.path }}
tags: |
${{ COMMIT_TAG }}
${{ LATEST_TAG }}
e2e:
name: "E2E test"
runs-on: ubuntu-latest
needs:
- docker-images
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23
cache-dependency-path: |
core/go.sum
configmodule/go.sum
sidecar/go.sum
testing/interchaintest/go.sum
testing/simapp/go.sum
testing/rollupsimapp/go.sum
- name: Install just
uses: extractions/setup-just@v2
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Run e2e tests
run: just test-e2e ${SHORT_SHA}