|
| 1 | +name: 'Nightly Checks' |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + # Run at 12:15 AM UTC (Scheduled actions are not guaranteed during times of high load like the top of the |
| 6 | + # hour or 00:00. See discussion: https://github.com/orgs/community/discussions/27130) |
| 7 | + - cron: '15 0 * * *' |
| 8 | + |
| 9 | +jobs: |
| 10 | + db-flakiness-recovery: |
| 11 | + runs-on: ubuntu-22.04 |
| 12 | + permissions: |
| 13 | + contents: read |
| 14 | + steps: |
| 15 | + ######## CHECKOUT/SETUP PLATFORM ############# |
| 16 | + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 |
| 17 | + with: |
| 18 | + fetch-depth: 0 |
| 19 | + path: platform |
| 20 | + - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 |
| 21 | + with: |
| 22 | + go-version-file: 'platform/service/go.mod' |
| 23 | + check-latest: false |
| 24 | + cache-dependency-path: | |
| 25 | + platform/examples/go.sum |
| 26 | + platform/protocol/go/go.sum |
| 27 | + platform/sdk/go.sum |
| 28 | + platform/service/go.sum |
| 29 | + ######## SPIN UP PLATFORM/BACKEND ############# |
| 30 | + - run: | |
| 31 | + ./.github/scripts/init-temp-keys.sh |
| 32 | + cp opentdf-dev.yaml opentdf.yaml |
| 33 | + working-directory: platform |
| 34 | + - name: Added Trusted Certs |
| 35 | + run: | |
| 36 | + sudo chmod -R 777 ./keys |
| 37 | + sudo apt-get install -y ca-certificates |
| 38 | + sudo cp ./keys/localhost.crt /usr/local/share/ca-certificates |
| 39 | + sudo update-ca-certificates |
| 40 | + working-directory: platform |
| 41 | + - run: docker compose up -d --wait --wait-timeout 240 |
| 42 | + working-directory: platform |
| 43 | + - run: go run ./service provision keycloak |
| 44 | + working-directory: platform |
| 45 | + - run: go run ./service provision fixtures |
| 46 | + working-directory: platform |
| 47 | + - uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 |
| 48 | + name: start server in background |
| 49 | + with: |
| 50 | + run: > |
| 51 | + go build -o opentdf -v service/main.go |
| 52 | + && .github/scripts/watch.sh opentdf.yaml ./opentdf start |
| 53 | + wait-on: | |
| 54 | + tcp:localhost:8080 |
| 55 | + log-output-if: true |
| 56 | + wait-for: 90s |
| 57 | + working-directory: platform |
| 58 | + |
| 59 | + ######## CHECKOUT/BUILD 'otdfctl' ############# |
| 60 | + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 |
| 61 | + with: |
| 62 | + repository: opentdf/otdfctl |
| 63 | + ref: main |
| 64 | + fetch-depth: 0 |
| 65 | + path: otdfctl |
| 66 | + - run: go build -o otdfctl |
| 67 | + working-directory: otdfctl |
| 68 | + - run: cp otdfctl ../platform |
| 69 | + working-directory: otdfctl |
| 70 | + |
| 71 | + ######## RUN TESTS ############# |
| 72 | + - run: ./.github/scripts/connectivity-test.sh |
| 73 | + name: Flaky Connectivity Test |
| 74 | + working-directory: platform |
| 75 | + ci-checks: |
| 76 | + uses: opentdf/platform/.github/workflows/checks.yaml@main |
0 commit comments