-
-
Notifications
You must be signed in to change notification settings - Fork 742
Fix testcontainers cleanup #2023
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
80551ed
update testcontainers packages
nicktrn 68eb755
increase cleanup timeout and add better logs
nicktrn c6fa8b7
small tweaks
nicktrn 8f4ebdd
decrease docker network size so we can have more of them
nicktrn 5595852
add a test flow to check this all works
nicktrn 9bf7a19
await all engine.quit calls
nicktrn cc62dbd
add docker diagnostics
nicktrn 9a53fed
reduce number of test runs
nicktrn c2a5ea3
improve network attachment output
nicktrn a55c49e
add setup logs
nicktrn f033f82
log redis setup errors
nicktrn c66a302
add cleanup log type
nicktrn 2e47955
stop redis container if setup fails
nicktrn f5672ab
disable ipv6
nicktrn 19b749d
tidy things up a bit
nicktrn aecde2e
fix unit tests workflow
nicktrn 931c85f
Merge remote-tracking branch 'origin/main' into fix/testcontainers
nicktrn b8b17f1
decrease container cleanup timeout
nicktrn 7439b32
fix types
nicktrn dcb62f5
fix webapp typecheck
nicktrn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: "🐳 Testcontainers" | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
unitTests: | ||
name: "🧪 Unit Tests (run ${{ matrix.run }})" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | ||
steps: | ||
- name: 🔧 Configure docker address pool | ||
run: | | ||
CONFIG='{ | ||
"default-address-pools" : [ | ||
{ | ||
"base" : "172.17.0.0/12", | ||
"size" : 20 | ||
}, | ||
{ | ||
"base" : "192.168.0.0/16", | ||
"size" : 24 | ||
} | ||
] | ||
}' | ||
mkdir -p /etc/docker | ||
echo "$CONFIG" | sudo tee /etc/docker/daemon.json | ||
sudo systemctl restart docker | ||
|
||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: ⎔ Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 8.15.5 | ||
|
||
- name: ⎔ Setup node | ||
uses: buildjet/setup-node@v4 | ||
with: | ||
node-version: 20.11.1 | ||
cache: "pnpm" | ||
|
||
# ..to avoid rate limits when pulling images | ||
- name: 🐳 Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: 📥 Download deps | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: 📀 Generate Prisma Client | ||
run: pnpm run generate | ||
|
||
- name: 🧪 Run Webapp Unit Tests | ||
run: pnpm run test:webapp | ||
env: | ||
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres | ||
DIRECT_URL: postgresql://postgres:postgres@localhost:5432/postgres | ||
SESSION_SECRET: "secret" | ||
MAGIC_LINK_SECRET: "secret" | ||
ENCRYPTION_KEY: "secret" | ||
|
||
- name: 🧪 Run Package Unit Tests | ||
run: pnpm run test:packages | ||
|
||
- name: 🧪 Run Internal Unit Tests | ||
run: pnpm run test:internal |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.