Skip to content

Commit 993ea0a

Browse files
committed
ci: try using composite action for tests
1 parent 782199f commit 993ea0a

File tree

1 file changed

+40
-43
lines changed

1 file changed

+40
-43
lines changed

.github/workflows/backend-sdk-test.yml

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,8 @@ jobs:
4444
steps:
4545
- uses: actions/checkout@v4
4646
with:
47+
# Checking out to a custom path since the test repo will also be cloned
4748
path: supertokens-python
48-
- uses: actions/checkout@v4
49-
with:
50-
repository: supertokens/backend-sdk-testing
51-
# ref: ${{ matrix.fdi-version }}
52-
ref: ci/github-actions/containerized-core/4.0
53-
path: backend-sdk-testing
5449

5550
- uses: supertokens/get-versions-action@main
5651
id: versions
@@ -61,10 +56,6 @@ jobs:
6156
env:
6257
SUPERTOKENS_API_KEY: ${{ secrets.SUPERTOKENS_API_KEY }}
6358

64-
- uses: actions/setup-python@v5
65-
with:
66-
python-version: ${{ matrix.py-version }}
67-
6859
- uses: actions/setup-node@v4
6960
with:
7061
node-version: ${{ matrix.node-version }}
@@ -86,39 +77,45 @@ jobs:
8677
docker compose up --build --wait
8778
python3 tests/test-server/app.py &
8879
89-
- name: Setup backend-sdk-testing
90-
working-directory: backend-sdk-testing
91-
run: |
92-
npm install
93-
npm run build
80+
- uses: supertokens/backend-sdk-testing-action@main
81+
with:
82+
# version: ${{ matrix.fdi-version }}
83+
version: ci/github-actions/containerized-core/4.0
84+
path: backend-sdk-testing
9485

95-
- name: Run tests
96-
working-directory: backend-sdk-testing
97-
run: |
98-
npm test
99-
env:
100-
SUPERTOKENS_CORE_TAG: ${{ steps.versions.outputs.coreTag }}
101-
TEST_MODE: testing
102-
NODE_PORT: 8081
86+
# - name: Setup backend-sdk-testing
87+
# working-directory: backend-sdk-testing
88+
# run: |
89+
# npm install
90+
# npm run build
10391

104-
- name: Fix paths
105-
working-directory: backend-sdk-testing
106-
if: always()
107-
# Doing it in the shell since the Reporter's `transformers` don't seem to work
108-
run: sed -i "s|$GITHUB_WORKSPACE/backend-sdk-testing/test||g" test-results.xml
92+
# - name: Run tests
93+
# working-directory: backend-sdk-testing
94+
# run: |
95+
# npm test
96+
# env:
97+
# SUPERTOKENS_CORE_TAG: ${{ steps.versions.outputs.coreTag }}
98+
# TEST_MODE: testing
99+
# NODE_PORT: 8081
109100

110-
- name: Reporter
111-
# Alternative: dorny/test-reporter@v1 - does not create a summary
112-
uses: mikepenz/action-junit-report@v5
113-
if: always()
114-
with:
115-
report_paths: backend-sdk-testing/test-results.xml
116-
check_name: Backend SDK Tests (${{matrix.cdi-version}}, ${{matrix.fdi-version}}, ${{matrix.py-version}}, ${{matrix.node-version}})
117-
# Include table with all test results in the summary
118-
detailed_summary: true
119-
# Group the testcases by test suite in the detailed_summary
120-
group_suite: true
121-
# Fail if no test are found.
122-
require_tests: true
123-
# Fail the build in case of a test failure.
124-
fail_on_failure: true
101+
# - name: Fix paths
102+
# working-directory: backend-sdk-testing
103+
# if: always()
104+
# # Doing it in the shell since the Reporter's `transformers` don't seem to work
105+
# run: sed -i "s|$GITHUB_WORKSPACE/backend-sdk-testing/test||g" test-results.xml
106+
107+
# - name: Reporter
108+
# # Alternative: dorny/test-reporter@v1 - does not create a summary
109+
# uses: mikepenz/action-junit-report@v5
110+
# if: always()
111+
# with:
112+
# report_paths: backend-sdk-testing/test-results.xml
113+
# check_name: Backend SDK Tests (${{matrix.cdi-version}}, ${{matrix.fdi-version}}, ${{matrix.node-version}})
114+
# # Include table with all test results in the summary
115+
# detailed_summary: true
116+
# # Group the testcases by test suite in the detailed_summary
117+
# group_suite: true
118+
# # Fail if no test are found.
119+
# require_tests: true
120+
# # Fail the build in case of a test failure.
121+
# fail_on_failure: true

0 commit comments

Comments
 (0)