fix: test using apps #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Million Users Test | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
push: | |
branches: | |
- master | |
- "v[0-9]+.[0-9]+" | |
tags: | |
- "(dev-)?v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
dependency-branches: | |
name: Dependency Branches | |
runs-on: ubuntu-latest | |
outputs: | |
branches: ${{ steps.result.outputs.branches }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: supertokens/get-core-dependencies-action@main | |
id: result | |
with: | |
running-for: core | |
million-users-test: | |
name: Million Users Test | |
needs: dependency-branches | |
# if: github.event_name != 'pull_request' || github.event.review.state == 'approved' | |
strategy: | |
fail-fast: false | |
matrix: | |
plugin: | |
- postgresql | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 15.0.1 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 15.0.1 | |
distribution: zulu | |
- uses: actions/checkout@v2 | |
with: | |
repository: supertokens/supertokens-root | |
path: ./supertokens-root | |
ref: master | |
- uses: actions/checkout@v2 | |
with: | |
path: ./supertokens-root/supertokens-core | |
- uses: actions/checkout@v2 | |
with: | |
repository: supertokens/supertokens-plugin-interface | |
path: ./supertokens-root/supertokens-plugin-interface | |
ref: ${{ fromJson(needs.dependency-branches.outputs.branches)['plugin-interface'] }} | |
- uses: actions/checkout@v2 | |
if: matrix.plugin != 'sqlite' | |
with: | |
repository: supertokens/supertokens-${{ matrix.plugin }}-plugin | |
path: ./supertokens-root/supertokens-${{ matrix.plugin }}-plugin | |
ref: ${{ fromJson(needs.dependency-branches.outputs.branches)[matrix.plugin] }} | |
- name: Load Modules | |
run: | | |
cd supertokens-root | |
echo "core,master | |
plugin-interface,master | |
${{ matrix.plugin }}-plugin,master | |
" > modules.txt | |
cat modules.txt | |
./loadModules | |
- name: Setup test env | |
run: cd supertokens-root && ./utils/setupTestEnv --local | |
- name: Start ${{ matrix.plugin }} server | |
if: matrix.plugin != 'sqlite' | |
run: cd supertokens-root/supertokens-${{ matrix.plugin }}-plugin && ./startDb.sh | |
- name: Run OAuth Provider | |
run: cd supertokens-root && docker run -p 4444:4444 -p 4445:4445 -d --rm --name oauth-cicd rishabhpoddar/oauth-server-cicd && sleep 2 | |
- name: Run tests | |
env: | |
ONE_MILLION_USERS_TEST: 1 | |
run: | | |
cd supertokens-root | |
./gradlew :supertokens-${{ matrix.plugin }}-plugin:test --tests io.supertokens.storage.${{ matrix.plugin }}.test.OneMillionUsersTest | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v5 | |
if: always() | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
detailed_summary: true | |
include_passed: false | |
annotate_notice: false |