Skip to content

Commit

Permalink
ref(ci): Use a single CI workflow for tests
Browse files Browse the repository at this point in the history
This is an initial implementation to solve the re-building of our Docker image, which is being built multiple times by our Github Actions.

This is meant to fix -> devops: Build CI Docker runs twice for every PR #7816
  • Loading branch information
gustavovalverde committed Jun 4, 2024
1 parent 3147d20 commit 1eec396
Show file tree
Hide file tree
Showing 9 changed files with 466 additions and 564 deletions.
115 changes: 0 additions & 115 deletions .github/workflows/ci-integration-tests-gcp.patch-external.yml

This file was deleted.

105 changes: 0 additions & 105 deletions .github/workflows/ci-integration-tests-gcp.patch.yml

This file was deleted.

132 changes: 132 additions & 0 deletions .github/workflows/ci-tests.patch-external.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Workflow patches for skipping CI tests on PRs from external repositories
name: Run tests

# Run on PRs from external repositories, let them pass, and then Mergify will check them.
# GitHub doesn't support filtering workflows by source branch names, so we have to do it for each
# job.
on:
pull_request:

#! IMPORTANT
#!
#! The job names in `sub-ci-unit-tests-docker.yml`, `sub-ci-integration-tests-gcp.yml`,
#! `ci-tests.patch.yml` and `ci-tests.patch-external.yml` must be kept in sync.
jobs:
build:
name: Run tests / Build CI Docker / Build images
# Only run on PRs from external repositories.
if: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

####
## The following jobs are related to sub-ci-unit-tests-docker.yml
###
test-all:
name: Run tests / Test all
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

test-fake-activation-heights:
name: Run tests / Test with fake activation heights
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

test-empty-sync:
name: Run tests / Test checkpoint sync from empty state
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

test-lightwalletd-integration:
name: Run tests / Test integration with lightwalletd
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

test-configuration-file:
name: Run tests / Test CI default Docker config file / Test default-conf in Docker
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

test-zebra-conf-path:
name: Run tests / Test CI custom Docker config file / Test custom-conf in Docker
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'


####
## The following jobs are related to sub-ci-intgration-tests-gcp.yml
###

# We don't patch the testnet job, because testnet isn't required to merge (it's too unstable)
get-available-disks:
name: Run tests / Check if cached state disks exist for Mainnet / Check if cached state disks exist
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

test-stateful-sync:
name: Run tests / Zebra checkpoint update / Run sync-past-checkpoint test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

test-update-sync:
name: Run tests / Zebra tip update / Run update-to-tip test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

checkpoints-mainnet:
name: Run tests / Generate checkpoints mainnet / Run checkpoints-mainnet test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

lightwalletd-rpc-test:
name: Run tests / Zebra tip JSON-RPC / Run fully-synced-rpc test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

lightwalletd-transactions-test:
name: Run tests / lightwalletd tip send / Run lwd-send-transactions test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

get-block-template-test:
name: Run tests / get block template / Run get-block-template test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

submit-block-test:
name: Run tests / submit block / Run submit-block test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

lightwalletd-full-sync:
name: Run tests / lightwalletd tip / Run lwd-full-sync test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

lightwalletd-update-sync:
name: Run tests / lightwalletd tip update / Run lwd-update-sync test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

lightwalletd-grpc-test:
name: Run tests / lightwalletd GRPC tests / Run lwd-grpc-wallet test
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'
Loading

0 comments on commit 1eec396

Please sign in to comment.