Skip to content

fix: test using apps #1130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 159 commits into
base: 10.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
175f3c9
fix: remove unnecessary process start and stop in tests
Mar 19, 2025
b3ea4c6
fix: usermetadata and userroles
Mar 19, 2025
03f044d
fix: delete app in kill
Mar 19, 2025
0a2a859
fix: email password tests
Mar 20, 2025
e137d50
fix: email verification tests
Mar 20, 2025
1b089ea
fix: dashboard tests
Mar 20, 2025
8569bfd
fix: account linking tests
Mar 20, 2025
34a5400
fix: passwordless tests
Mar 20, 2025
4054a1f
fix: passwordless tests
Mar 20, 2025
4e84711
fix: thirdparty tests
Mar 20, 2025
4617ceb
fix: jwt tests
Mar 20, 2025
1b36fa4
fix: mfa tests
Mar 20, 2025
34b5581
fix: oauth tests
Mar 20, 2025
cc28f29
fix: webauthn tests
Mar 20, 2025
3e43b9b
fix: useridmapping tests
Mar 20, 2025
b7b6125
fix: totp tests
Mar 20, 2025
1b96a20
fix: session tests
Mar 20, 2025
eaccaaa
fix: auth recipe tests
Mar 20, 2025
69aff3d
fix: refactor testing process and fix all tests
Mar 25, 2025
a87c22d
Merge branch '10.1' into fix/test-using-apps
Mar 25, 2025
11b7874
fix: unit test gha
Mar 25, 2025
5dc60ab
fix: unit test gha
Mar 25, 2025
a32dbb3
fix: unit test gha
Mar 25, 2025
155e86e
fix: unit test gha
Mar 25, 2025
7158bb2
fix: unit test gha
Mar 25, 2025
a7530de
fix: unit test gha
Mar 25, 2025
49fdfa4
fix: unit test gha
Mar 25, 2025
9afc9d3
fix: unit test gha
Mar 25, 2025
26898ad
fix: unit test gha
Mar 25, 2025
2f89d4c
fix: unit test gha
Mar 25, 2025
43302c1
fix: unit test gha
Mar 25, 2025
b437da7
fix: unit test gha
Mar 25, 2025
fce0776
fix: unit test gha
Mar 25, 2025
a7f436f
fix: unit test gha
Mar 25, 2025
3d3e055
fix: unit test gha
Mar 25, 2025
2f81fb2
fix: unit test gha
Mar 25, 2025
e09d1d5
fix: unit test gha
Mar 25, 2025
d0d20dc
fix: unit test gha
Mar 25, 2025
867dc00
fix: unit test gha
Mar 25, 2025
ddb510d
fix: unit test gha
Mar 25, 2025
93e46e7
fix: unit test gha
Mar 25, 2025
f26fa66
fix: unit test gha
Mar 25, 2025
0d6c8be
fix: unit test gha
Mar 25, 2025
285449f
fix: unit test gha
Mar 25, 2025
157529b
fix: unit test gha
Mar 25, 2025
2235491
fix: unit test gha
Mar 25, 2025
a8c3f34
fix: unit test gha
Mar 25, 2025
0ae9a88
fix: unit test gha
Mar 25, 2025
28635eb
fix: unit test gha
Mar 25, 2025
531e665
fix: unit test gha
Mar 25, 2025
ccbbc1d
fix: unit test gha
Mar 25, 2025
6f30640
fix: unit test gha
Mar 25, 2025
eaebfa5
fix: unit test gha
Mar 25, 2025
d508b26
fix: unit test gha
Mar 26, 2025
a86fb2e
fix: unit test gha
Mar 26, 2025
cf981bc
fix: unit test gha
Mar 26, 2025
ce6e1e6
fix: unit test gha
Mar 26, 2025
b4c5b1b
fix: unit test gha
Mar 26, 2025
f04828d
fix: unit test gha
Mar 26, 2025
065a3d3
fix: unit test gha
Mar 26, 2025
c0a29b6
fix: unit test gha
Mar 26, 2025
4fda3d9
fix: unit test gha
Mar 26, 2025
1a13d43
fix: mongo tests
Mar 27, 2025
7518fa0
fix: mongo tests
Mar 27, 2025
d769d9b
fix: gha
Mar 27, 2025
5809cef
fix: flaky
Mar 27, 2025
60bf561
Merge branch '10.1' into fix/test-using-apps
Mar 27, 2025
d845c7e
fix: compile error
Mar 27, 2025
909d15a
fix: tests
Mar 27, 2025
5a8b2ad
fix: for mongo
Mar 27, 2025
df37835
fix: tests
Mar 27, 2025
f9a87ed
fix: tests
Mar 27, 2025
1cb3b92
fix: tests
Mar 27, 2025
d37278e
fix: tests
Mar 27, 2025
c015670
fix: tests
Mar 27, 2025
2dd9b2c
fix: tests
Mar 27, 2025
8c19d34
fix: tests
Mar 27, 2025
4c3ab01
fix: tests
Mar 27, 2025
0edc376
fix: disable speed test
Apr 2, 2025
8d8914a
fix: one million users test
Apr 2, 2025
06056c3
fix: test update
Apr 2, 2025
9e14bd4
fix: sqlite test
Apr 2, 2025
a874e15
fix: tests
Apr 2, 2025
be38fa3
fix: working test parallelisation for in-memory
Apr 2, 2025
7c23882
fix: more parallelism
Apr 2, 2025
16e0e4d
fix: trying arm
Apr 2, 2025
57e55a3
fix: ubuntu
Apr 2, 2025
398f108
fix: ee tests
Apr 2, 2025
29fe839
fix: increase retry
Apr 2, 2025
a9ddf66
fix: ee tests
Apr 2, 2025
6f666af
fix: parallelised postgres tests
Apr 2, 2025
20b185f
fix: tests
Apr 3, 2025
4be2c17
fix: tests
Apr 3, 2025
e18b414
fix: workflow
Apr 3, 2025
8ce7949
fix: tests
Apr 3, 2025
856acc1
fix: tests
Apr 4, 2025
530af35
fix: tests
Apr 4, 2025
fd153db
fix: mysql for test
Apr 4, 2025
54558fb
fix: tests
Apr 4, 2025
24fcf67
fix: tests
Apr 4, 2025
c647f40
fix: add mongo service
Apr 4, 2025
df11310
fix: add mongo service
Apr 4, 2025
26b448a
fix: services
Apr 7, 2025
06b6691
fix: changelog and version
Apr 8, 2025
27643e7
Merge branch '10.1' into fix/test-using-apps
Apr 8, 2025
a573caf
fix: docker build
Apr 8, 2025
222c9e5
fix: docker build
Apr 8, 2025
88eb019
fix: docker build
Apr 8, 2025
1a1201c
fix: docker build
Apr 8, 2025
4c5d89c
fix: docker build
Apr 8, 2025
ee3b552
fix: release workflow
Apr 8, 2025
25d5c4a
fix: release workflow
Apr 8, 2025
0174c99
fix: release workflow
Apr 8, 2025
cbf7d79
fix: release workflow
Apr 8, 2025
17832b3
fix: stress tests
Apr 10, 2025
6e7780c
fix: stress tests
Apr 10, 2025
42f4738
fix: stress tests
Apr 10, 2025
cdfe556
fix: stress tests
Apr 10, 2025
8d2a26e
fix: stress tests
Apr 10, 2025
56c6163
fix: stress tests
Apr 10, 2025
1d84531
fix: stress tests
Apr 10, 2025
3e1588e
fix: stress tests
Apr 10, 2025
18f0063
fix: stress tests
Apr 10, 2025
40b635f
fix: stress tests
Apr 11, 2025
edd7c8c
fix: stress tests
Apr 11, 2025
9b6e8a9
fix: stress tests
Apr 11, 2025
a080b90
fix: stress tests
Apr 11, 2025
99f65dd
fix: stress tests
Apr 11, 2025
49bf17b
fix: stress tests
Apr 14, 2025
611ffb8
fix: stress tests
Apr 14, 2025
587dcbd
fix: stress tests
Apr 14, 2025
925483f
fix: stress tests
Apr 15, 2025
f29085c
fix: stress tests
Apr 15, 2025
69cd8fb
fix: stress tests
Apr 15, 2025
6cf1f3c
fix: stress tests
sattvikc Apr 23, 2025
5dc0da3
fix: stress tests
sattvikc Apr 23, 2025
e71846a
fix: stress tests
sattvikc Apr 23, 2025
9843423
fix: stress tests
sattvikc Apr 23, 2025
037c2dc
fix: stress tests
sattvikc Apr 23, 2025
7b86397
fix: stress tests
sattvikc Apr 23, 2025
046f3bf
fix: stress tests
sattvikc Apr 23, 2025
b882125
fix: stress tests
sattvikc Apr 23, 2025
f692aaa
fix: stress tests
sattvikc Apr 28, 2025
f0ded19
fix: stress tests
sattvikc Apr 28, 2025
d18e42b
fix: stress tests
sattvikc Apr 28, 2025
fef7b7d
fix: stress tests
sattvikc Apr 28, 2025
cc3926f
fix: stress tests
sattvikc Apr 28, 2025
682d096
fix: release workflow
sattvikc Apr 29, 2025
1fcc578
Merge branch '10.1' into fix/test-using-apps
sattvikc Apr 29, 2025
ea28071
fix: compile error
sattvikc Apr 29, 2025
43b3d20
fix: compile error
sattvikc Apr 29, 2025
8fa0560
fix: release
sattvikc Apr 29, 2025
f491c51
fix: release
sattvikc Apr 29, 2025
ff485e4
fix: gha refactor
sattvikc May 1, 2025
b0fc063
fix: gha refactor
sattvikc May 1, 2025
9680d25
fix: gha refactor
sattvikc May 1, 2025
c4d016e
fix: gha refactor
sattvikc May 1, 2025
3ef2664
fix: gha refactor
sattvikc May 1, 2025
535e11d
Merge branch '10.1' into fix/test-using-apps
sattvikc May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
72 changes: 72 additions & 0 deletions .github/workflows/dev-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Checks for release

on:
push:
tags:
- 'dev-*'

jobs:
dependency-versions:
name: Dependency Versions
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.result.outputs.versions }}
steps:
- uses: actions/checkout@v4
- uses: supertokens/get-core-dependencies-action@main
id: result
unit-tests:
name: Run unit tests
uses: ./.github/workflows/unit-test.yml
stress-tests:
uses: ./.github/workflows/stress-tests.yml
mark-as-passed:
needs: [dependency-versions, unit-tests, stress-tests]
name: Mark as passed
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
plugin:
- sqlite
- postgresql
- mysql
- mongodb
steps:
- name: Mark plugin as passed
if: matrix.plugin != 'sqlite'
uses: muhfaris/request-action@v1
with:
url: https://api.supertokens.io/0/plugin
method: PATCH
headers: |
{
"Content-Type": "application/json",
"api-version": "0"
}
body: |
{
"password": "${{ secrets.SUPERTOKENS_API_KEY }}",
"version": "${{ needs.dependency-versions.outputs.versions['core'] }}",
"planType": "FREE",
"name": "${{ matrix.plugin }}",
"testPassed": true
}
- name: Mark core as passed
if: matrix.plugin == 'sqlite'
uses: muhfaris/request-action@v1
with:
url: https://api.supertokens.io/0/core
method: PATCH
headers: |
{
"Content-Type": "application/json",
"api-version": "0"
}
body: |
{
"password": "${{ secrets.SUPERTOKENS_API_KEY }}",
"version": "${{ needs.dependency-versions.outputs.versions['core'] }}",
"planType": "FREE",
"testPassed": true
}
15 changes: 0 additions & 15 deletions .github/workflows/github-actions-changelog.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/lint-pr-title.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR Checks
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]

jobs:
pr-title:
name: Lint PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: true
changelog:
name: Enforce Changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dangoslen/changelog-enforcer@v2
with:
changeLogPath: 'CHANGELOG.md'
skipLabels: 'Skip-Changelog'
unit-tests:
name: Run unit tests
uses: ./.github/workflows/unit-test.yml
87 changes: 71 additions & 16 deletions .github/workflows/publish-dev-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,75 @@ on:
branches:
- "**"
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
docker:
name: Docker
runs-on: ubuntu-latest
needs: dependency-branches
outputs:
tag: ${{ steps.set_tag.outputs.TAG }}
strategy:
fail-fast: false
matrix:
plugin:
- postgresql
- mysql
# - mongodb
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: Generate config file
run: |
cd supertokens-root
touch config_temp.yaml
cat supertokens-core/config.yaml >> config_temp.yaml
cat supertokens-${{ matrix.plugin }}-plugin/config.yaml >> config_temp.yaml
mv config_temp.yaml config.yaml

- name: set tag
id: set_tag
run: |
Expand All @@ -17,26 +83,15 @@ jobs:
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# - name: Build and export to Docker
# uses: docker/build-push-action@v6
# with:
# load: true
# tags: ${{ env.TEST_TAG }}

# - name: Test
# run: |
# docker run --rm ${{ env.TEST_TAG }}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: supertokens/supertokens-core:dev-branch-${{ steps.set_tag.outputs.TAG }}
file: .github/helpers/Dockerfile
context: ./supertokens-root
tags: supertokens/supertokens-dev-${{ matrix.plugin }}:${{ steps.set_tag.outputs.TAG }}
file: ./supertokens-root/supertokens-${{ matrix.plugin }}-plugin/.github/helpers/docker/Dockerfile
48 changes: 48 additions & 0 deletions .github/workflows/stress-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Stress Tests

on:
workflow_call:
inputs:
tag:
description: 'Docker image tag to use'
required: true
type: string


jobs:
stress-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: |
cd stress-tests
npm install
- name: Update Docker image in compose
run: |
cd stress-tests
sed -i 's|supertokens/supertokens-postgresql|supertokens/supertokens-dev-postgresql:${{ inputs.tag }}|' docker-compose.yml
cat docker-compose.yml
- name: Bring up the services
run: |
cd stress-tests
docker compose up -d
- name: Generate user jsons
run: |
cd stress-tests
npm run generate-users
- name: Run one million users test
id: one-million-users
run: |
cd stress-tests
npm run one-million-users | tee stress-tests.log
- name: Display Test Statistics
run: |
echo "## Stress Test Results" >> $GITHUB_STEP_SUMMARY
echo "| Test | Duration |" >> $GITHUB_STEP_SUMMARY
echo "|------|----------|" >> $GITHUB_STEP_SUMMARY
jq -r '.measurements[] | "| \(.title) | \(.formatted) |"' stress-tests/stats.json >> $GITHUB_STEP_SUMMARY
24 changes: 0 additions & 24 deletions .github/workflows/tests-pass-check-pr.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/tests.yml

This file was deleted.

Loading
Loading