Skip to content

Commit

Permalink
Revert "Add integration test matrix" (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeNQ committed Jun 20, 2023
1 parent 4fb6231 commit c43f7d3
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 118 deletions.
15 changes: 0 additions & 15 deletions .github/tests/change-entry-test.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .github/tests/restore-entry-test.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .github/tests/run-go-test.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .github/tests/run-mysql-test.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .github/tests/run-postgres-test.sh

This file was deleted.

42 changes: 5 additions & 37 deletions .github/workflows/pr_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,51 +89,19 @@ jobs:
- name: Run clean check
run: make git-clean-check

build-matrix:
name: Build matrix
runs-on: ubuntu-22.04

needs: [lint]

steps:
- name: Checkout
uses: actions/[email protected]

- id: set-matrix
name: Collect all tests
run: |
tests="$(find .github/tests -maxdepth 1 -type f -name '*.sh' -exec basename {} \; | sort | uniq)"
tests_json="$(echo "$tests" | jq -c --slurp --raw-input 'split("\n") | map(select(. != ""))')"
echo "tests=$tests_json" >> $GITHUB_OUTPUT
echo "Collected tests: $tests_json"
outputs:
tests: ${{ steps.set-matrix.outputs.tests }}


integration-tests:
runs-on: ubuntu-22.04
needs: [build-matrix]
permissions:
contents: read

steps:
- uses: actions/checkout@v3
- name: Build containers
run: ./build.sh
shell: bash
working-directory: ./it
- name: Run tests
run: |
tests_array="$(echo '${{ needs.build-matrix.outputs.tests }}' | jq -r '.[]')"
echo "Tests array: $tests_array"
# Convert the JSON string to an array using jq
for test in $tests_array; do
echo "Running test: $test"
bash "${test}"
# Execute your test command or script for each test
done
working-directory: ./.github/tests
- name: Run integration tests
run: ./integration_test.sh
shell: bash
working-directory: ./it

build:
name: build (linux)
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ rpm/*.rpm
/.build
*.swp
*.swo
bootstrap.crt
bootstrap.crt
4 changes: 2 additions & 2 deletions it/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: '3'
services:
spire-server:
image: ghcr.io/spiffe/spire-server:1.7.0
image: ghcr.io/spiffe/spire-server:1.6.3
hostname: spire-server
volumes:
- ./spire/server:/opt/spire/conf/server
command: ["-config", "/opt/spire/conf/server/server.conf"]

spire-agent:
image: ghcr.io/spiffe/spire-agent:1.7.0
image: ghcr.io/spiffe/spire-agent:1.6.3
depends_on: ["spire-server"]
hostname: spire-agent
volumes:
Expand Down

0 comments on commit c43f7d3

Please sign in to comment.