Skip to content
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
17 changes: 12 additions & 5 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ env:
GITHUB_ROLE_ARN: arn:aws:iam::461800378586:role/GitHubECRPublic

permissions:
id-token: write # Required for OIDC
contents: read # This is required for actions/checkout
id-token: write # Required for OIDC
contents: read # This is required for actions/checkout
checks: write # Required to publish test results
pull-requests: write # Required to publish test results

jobs:
build_and_push:
Expand Down Expand Up @@ -93,9 +95,7 @@ jobs:
password: ${{ secrets.PANUBUILD_QUAYIO_TOKEN }}

- name: Setup BATS
uses: panubo/setup-bats-action@v2
with:
bats-version: 1.7.0
uses: bats-core/[email protected]

- name: Build and export to Docker
uses: docker/build-push-action@v6
Expand All @@ -109,6 +109,13 @@ jobs:
run: |
make _ci_test

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: (!cancelled())
with:
files: |
tests/results/*.xml

- name: Build and Push
uses: docker/build-push-action@v6
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/results
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ test: ## run test suite
( cd tests; bats -j 4 . )

_ci_test:
( cd tests; bats -j 4 . )
-mkdir tests/results
( cd tests; bats -j 4 --report-formatter junit -o results . )
4 changes: 1 addition & 3 deletions tests/k8s.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
load test_helpers/bats-support/load
load test_helpers/bats-assert/load
load functions.bash
# load setup.bash
load setup.bash

setup_file() {
# Disable parallel execution in this file
Expand Down
4 changes: 1 addition & 3 deletions tests/nginx.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
load test_helpers/bats-support/load
load test_helpers/bats-assert/load
load functions.bash
# load setup.bash
load setup.bash

setup_file() {
container="$(docker run -d -p 8080 panubo/staticsite-testsite:1 nginx)"
Expand Down
6 changes: 2 additions & 4 deletions tests/s3-rollback.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
load test_helpers/bats-support/load
load test_helpers/bats-assert/load
load functions.bash
# load setup.bash
load setup.bash

setup_file() {
# Disable parallel execution in this file
Expand Down Expand Up @@ -32,7 +30,7 @@ setup_file() {
}

# setup() {

# }

teardown_file() {
Expand Down
6 changes: 2 additions & 4 deletions tests/s3-upgrade.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
load test_helpers/bats-support/load
load test_helpers/bats-assert/load
load functions.bash
# load setup.bash
load setup.bash

setup_file() {
# Disable parallel execution in this file
Expand Down Expand Up @@ -41,7 +39,7 @@ setup_file() {
}

# setup() {

# }

teardown_file() {
Expand Down
6 changes: 2 additions & 4 deletions tests/s3.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
load test_helpers/bats-support/load
load test_helpers/bats-assert/load
load functions.bash
# load setup.bash
load setup.bash

setup_file() {

Expand Down Expand Up @@ -43,7 +41,7 @@ setup_file() {
}

# setup() {

# }

teardown_file() {
Expand Down
12 changes: 12 additions & 0 deletions tests/setup.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Load bats libraries

# See https://github.com/bats-core/homebrew-bats-core for Homebrew install

# This list of PATHs should cover Linux, Mac and GitHub Actions
BATS_LIB_PATH="~/.bats/libs:/opt/homebrew/lib:/usr/local/bats:/usr/local:/usr/lib/bats:/usr/lib"
export BATS_LIB_PATH
bats_load_library bats-support
bats_load_library bats-assert
bats_load_library bats-file
bats_load_library bats-detik/utils.bash
bats_load_library bats-detik/detik.bash
1 change: 0 additions & 1 deletion tests/test_helpers/bats-assert
Submodule bats-assert deleted from e2d855
1 change: 0 additions & 1 deletion tests/test_helpers/bats-support
Submodule bats-support deleted from 9bf10e
Loading