Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PAN-2154 test e2e on prs #92

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ docker-compose*
.dockerignore
signer_key*
*docker.env
.github
.github/
export
47 changes: 46 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,13 @@ jobs:

- name: Build and load
run: |
mkdir export
make docker-build ARGS='--set "*.cache-from=type=local,src=/tmp/.buildx-cache" \
--set "*.cache-to=type=local,dest=/tmp/.buildx-cache-new" \
--set "*.platform=linux/${{ matrix.arch }}" \
--builder ${{ steps.buildx.outputs.name }}'
--builder ${{ steps.buildx.outputs.name }} \
--set "app.output=type=tar,dest=export/app.tar" \
--set "worker.output=type=tar,dest=export/worker.tar"'

- name: Test image
timeout-minutes: ${{ matrix.arch == 'amd64' && 10 || 30 }}
Expand All @@ -135,6 +138,13 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: docker-images-${{ matrix.arch }}
path: export
retention-days: 1

build:
uses: ./.github/workflows/build.yml

Expand Down Expand Up @@ -308,3 +318,38 @@ jobs:
run: |
timeout 1 make docker-logs || true
working-directory: ethereum-contracts

e2e-tests:
name: E2E tests
needs: docker-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: ['amd64', 'arm64']
env:
PANTOS_SERVICE_NODE: ${{ github.workspace }}/servicenode
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.PANTOS_SERVICE_NODE }}
sparse-checkout: |
docker-compose.yml
docker-compose.override.yml
Makefile

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: docker-images-${{ matrix.arch }}
path: export

- name: Load images
run: |
cat export/app.tar | docker import - pantosio/service-node-app:local
cat export/worker.tar | docker import - pantosio/service-node-worker:local

- uses: pantos-io/e2e-testing/.github/actions/run-tests@main
with:
servicenode-path: ${{ env.PANTOS_SERVICE_NODE }}
servicenode-version: 'local'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ debian/*debhelper*
debian/files
debian/*substvars
signer_key*
export
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
x-bake:
tags:
- ${DOCKER_REGISTRY-pantosio}/service-node-app:${DOCKER_TAG-local}
- ${DOCKER_REGISTRY-pantosio}/service-node-worker:${EXTRA_TAG-local}
- ${DOCKER_REGISTRY-pantosio}/service-node-app:${EXTRA_TAG-local}
networks:
pantos-service-node:
env_file: []
Expand Down