Skip to content

Commit

Permalink
Run integration tests against nightly (not latest) (#865)
Browse files Browse the repository at this point in the history
The `latest` tag of `quesma/quesma` is the latest released stable
release of Quesma, while `nightly` is the newest build of Quesma.
Integration tests used to run against `quesma/quesma:latest` and not the
last `nightly` build of Quesma, which meant that we wouldn't catch some
failures before release.

Fix this issue by running the integration tests against `nightly` and
always building the newest `quesma/quesma:nightly` in the
`integration-test.yml` GitHub workflow.
  • Loading branch information
avelanarius authored Oct 10, 2024
1 parent 95af2df commit f5782fe
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-quesma-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
default: false
required: false
type: boolean
REF:
description: 'The branch, tag or SHA to checkout. By default it will use the default branch'
default: ''
required: false
type: string
secrets:
DOCKER_USER:
required: false
Expand All @@ -30,6 +35,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.REF }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ on:
description: 'Commit hash to run the tests'
required: true
jobs:
build-quesma-docker-image:
uses: ./.github/workflows/build-quesma-docker-image.yml
with:
REF: ${{inputs.GIT_REF}}

integration-test-run:
runs-on: ubuntu-latest
needs: [build-quesma-docker-image]
steps:
- uses: actions/checkout@v4
with: ## @TODO REMOVE
Expand All @@ -24,11 +29,17 @@ jobs:
cache-dependency-path: smoke-test/go.sum
go-version: '1.22'

# (perhaps prefetching these should be considered)
# - name: Download images
# uses: actions/download-artifact@v4
# with:
# path: /tmp/images
- name: Download images
uses: actions/download-artifact@v4
with:
path: /tmp/images

- name: Load images
run: |
for file in /tmp/images/*/*.tar; do
docker load --input $file
done
docker image ls -a
- name: Set environment variable
run: echo "EXECUTING_ON_GITHUB_CI=true" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion ci/it/testcases/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func setupQuesma(ctx context.Context, quesmaConfig string) (testcontainers.Conta
return nil, err
}
quesmaReq := testcontainers.ContainerRequest{
Image: "quesma/quesma:latest",
Image: "quesma/quesma:nightly",
ExposedPorts: []string{"9999/tcp", "8080/tcp"},
Env: map[string]string{
"QUESMA_CONFIG_FILE": "/configuration/conf.yaml",
Expand Down

0 comments on commit f5782fe

Please sign in to comment.