diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index c42be23..4382e63 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -39,9 +39,23 @@ jobs: uses: kubeshop/tracetest-github-action@v1 with: token: ${{secrets.TRACETEST_CLI_TOKEN}} + + # playwright is required to run the script + # that sets up the initial org/env and gathers the token etc + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + run: npx playwright test + - name: Pull Trace based test definitions + env: + GH_USERNAME: ${{ secrets.TRACETEST_USER_GH_USERNAME }} + GH_PASSWORD: ${{ secrets.TRACETEST_USER_GH_PASSWORD }} + GH_SECRET: ${{ secrets.TRACETEST_USER_GH_SECRET }} + OUTPUT_TOKEN_FILE: "/tmp/token.json" run: | BASEDIR=$(pwd) + TESTS_DIR="/tmp/tracetest-cloud/testing" cd /tmp # sparse checkout of the testing directory @@ -56,5 +70,11 @@ jobs: sudo echo "127.0.0.1 tracetest.localdev" | sudo tee -a /etc/hosts sudo echo "127.0.0.1 pokeshop.localdev" | sudo tee -a /etc/hosts + + # run script for initial configuration + npx playwright test $TESTS_DIR/e2e-tracetesting/tests/setup/extract-default-token.setup.ts --grep '@manual' + + cat $OUTPUT_TOKEN_FILE + cat $OUTPUT_TOKEN_FILE | jq - tracetest run testsuite -f /tmp/tracetest-cloud/testing/server-tracetesting --vars ./tests/vars/ci.yaml \ No newline at end of file + tracetest run testsuite -f $TESTS_DIR/server-tracetesting --vars ./tests/vars/ci.yaml \ No newline at end of file