Skip to content
72 changes: 10 additions & 62 deletions .github/workflows/xtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,53 +57,11 @@ jobs:
distribution: "adopt"
server-id: github

######## CHECKOUT THE PLATFORM #############
- name: Check out platform
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
repository: opentdf/platform
path: platform
ref: ${{ env.PLATFORM_REF }}
- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: "1.22.3"
check-latest: false
cache-dependency-path: |
platform/service/go.sum
platform/examples/go.sum
platform/protocol/go/go.sum
platform/sdk/go.sum

######## SPIN UP BACKEND #############
- run: |
.github/scripts/init-temp-keys.sh
cp opentdf-dev.yaml opentdf.yaml
working-directory: platform
- name: Added Trusted Certs
run: |
sudo chmod -R 777 ./keys
sudo apt-get install -y ca-certificates
sudo cp ./keys/localhost.crt /usr/local/share/ca-certificates
sudo update-ca-certificates
working-directory: platform
- run: docker compose up -d --wait --wait-timeout 240
working-directory: platform
- run: go run ./service provision keycloak
working-directory: platform
- run: go run ./service provision fixtures
working-directory: platform
- uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635
name: start server in background
######## SPIN UP PLATFORM BACKEND #############
- name: Check out and start up platform with deps/containers
uses: opentdf/platform/test/start-up-with-containers@feat/reusable-startup
with:
run: >
go build -o opentdf -v service/main.go
&& .github/scripts/watch.sh opentdf.yaml ./opentdf start
wait-on: |
tcp:localhost:8080
log-output-if: true
wait-for: 90s
working-directory: platform
platform-ref: ${{ env.PLATFORM_REF }}

######## CHECKOUT CLIENT-WEB #############
- name: Check out client-web
Expand Down Expand Up @@ -142,8 +100,8 @@ jobs:
######## SETUP THE GO CLI #############
- name: Prepare go cli
run: |-
go mod edit -replace github.com/opentdf/platform/protocol/go=../platform/protocol/go
go mod edit -replace github.com/opentdf/platform/sdk=../platform/sdk
go mod edit -replace github.com/opentdf/platform/protocol/go=../otdf-test-platform/protocol/go
go mod edit -replace github.com/opentdf/platform/sdk=../otdf-test-platform/sdk
go mod tidy
go build .
cp ./otdfctl ../otdftests/xtest/sdk/go/otdfctl
Expand Down Expand Up @@ -189,21 +147,11 @@ jobs:
working-directory: otdftests/xtest

######## ATTRIBUTE BASED CONFIGURATION #############
- uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635
name: start another KAS server in background
- name: Check out and start up platform with deps/containers
uses: opentdf/platform/test/start-additional-kas@feat/reusable-startup
with:
run: >
<opentdf.yaml >opentdf-beta.yaml yq e '
(.server.port = 8282)
| (.mode = ["kas"])
| (.sdk_config = {"endpoint":"http://localhost:8080","plaintext":true,"client_id":"opentdf","client_secret":"secret"})
'
&& .github/scripts/watch.sh opentdf-beta.yaml ./opentdf --config-file ./opentdf-beta.yaml start
wait-on: |
tcp:localhost:8282
log-output-if: true
wait-for: 90s
working-directory: platform
kas-port: 8282
kas-name: beta

- name: Run attribute based configuration tests
run: |-
Expand Down