-
Notifications
You must be signed in to change notification settings - Fork 23
Setup integrations tests for MySQL and MSSQL #68
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
Closed
Closed
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d42eee7
apk git
4876030
added mysql to docker-compose
e31f9e9
basic config
fa8695e
fix eslint errors
b795f3e
test.yml
2194d4f
clean up env
013ec0c
Update .env.test
258733b
no need to publish
ce53c3f
added mysql tests
2899881
forcing exits
aa0327f
cleaned up sql server tests
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
NODE_ENV=test | ||
MSSQL_CREDENTIALS:Server=mssql,1433;Database=master;User Id=sa;Password=Pass@word;trustServerCertificate=true; | ||
MSSQL_CREDENTIALS_READ_ONLY:Server=mssql,1433;Database=master;User Id=reader;Password=re@derP@ssw0rd;trustServerCertificate=true; | ||
MYSQL_TEST_CREDENTIALS={"user":"root","host":"mysql","port":3306,"database":"mysql","ssl":"disabled"} | ||
MSSQL_CREDENTIALS:Server=mssql,1433;Database=master;User Id=sa;Password=Pass@word;trustServerCertificate=true; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Test | ||
on: push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
defaults: | ||
run: | ||
working-directory: . | ||
env: | ||
DOCKER_PACKAGE: ghcr.io/${{ github.repository }}/database-proxy_test | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Docker login | ||
run: echo ${GITHUB_TOKEN} | docker login -u ${GITHUB_ACTOR} --password-stdin ghcr.io | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Republish | ||
id: republish | ||
continue-on-error: true | ||
if: ${{ needs.Changes.outputs.connector == 'false' }} | ||
run: | | ||
../.github/retry docker pull ${DOCKER_PACKAGE}:${{ github.event.before }} | ||
docker tag ${DOCKER_PACKAGE}:${{ github.event.before }} ${DOCKER_PACKAGE}:${GITHUB_SHA} | ||
../.github/retry docker push ${DOCKER_PACKAGE}:${GITHUB_SHA} | ||
|
||
- name: Build | ||
if: ${{ steps.republish.outcome != 'success' }} | ||
run: docker-compose build | ||
- name: Lint | ||
if: ${{ steps.republish.outcome != 'success' }} | ||
run: docker-compose run lint | ||
- name: Test | ||
if: ${{ steps.republish.outcome != 'success' }} | ||
run: docker-compose run test | ||
- name: Container logs | ||
if: failure() | ||
run: docker-compose logs --no-color --timestamps | ||
- name: Publish | ||
if: ${{ steps.republish.outcome != 'success' }} | ||
run: | | ||
docker tag database-proxy_test:latest ${DOCKER_PACKAGE}:${GITHUB_SHA} | ||
../.github/retry docker push ${DOCKER_PACKAGE}:${GITHUB_SHA} |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
FROM node:18.12.1-alpine | ||
|
||
RUN apk update && apk --no-cache add git | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
|
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 |
---|---|---|
|
@@ -3,5 +3,5 @@ version: "3.7" | |
services: | ||
mssql: | ||
image: mcr.microsoft.com/azure-sql-edge | ||
expose: | ||
- "1433" | ||
ports: | ||
- "1433:1433" |
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.
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.