-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve Migrations Stablity #7
Merged
Merged
Changes from 33 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
304d426
Continue Work
PineappleIOnic 14e6491
Merge branch 'main' into feat-implement-tests
PineappleIOnic cc73348
Update Appwrite.php
PineappleIOnic 593ffb6
Continue work on tests
PineappleIOnic dbdce49
Merge branch 'feat-improve-reports' into feat-improve-features
PineappleIOnic 1f87a8c
Merge branch 'feat-implement-tests' into feat-improve-features
PineappleIOnic e19cf37
Update Transfer.php
PineappleIOnic 43bd801
Wrap getId from ?string to string
PineappleIOnic d22c31a
Keep working on Transfers
PineappleIOnic e4f3d43
Add size for NHost and Supabase
PineappleIOnic a30b2b2
Fix File Transfers
PineappleIOnic 813901b
Add 3 step file process
PineappleIOnic 536e6a3
Add 3 step storage transfers
PineappleIOnic 0eedfb0
Fix team memberships
PineappleIOnic 48f21a9
Bring back deployment transfers for versions >1.4.0
PineappleIOnic c7bae26
Fix functions and subcollections
PineappleIOnic 54a4283
Merge branch 'main' into feat-improve-features
PineappleIOnic 020f52a
Improve Status Counters to use last report to know pending
PineappleIOnic 41540eb
Continue work on tests
PineappleIOnic 947a2e6
Fix Files
PineappleIOnic 5d9f32c
Add Tests for Supabase and NHost
PineappleIOnic 3557317
Add Workflow
PineappleIOnic c45e82c
Update tests.yml
PineappleIOnic f5f7a3a
Update Dockerfile
PineappleIOnic 92fee96
Fix report merge
PineappleIOnic ff61281
Finish Tests for NHost and Supabase and Run Linter
PineappleIOnic e7e222f
Continue work on tests
PineappleIOnic 01d0d4d
Continue work on tests
PineappleIOnic 86afe1e
Update playground.php
PineappleIOnic 7362d0e
Update playground.php
PineappleIOnic 2ae93f0
Remove redundant setId functions
PineappleIOnic 6f784ab
Rename SQL Files
PineappleIOnic 35e32ff
Update Tests
PineappleIOnic 9d4b0a0
Update src/Transfer/Destinations/Appwrite.php
PineappleIOnic 4485e8a
Update src/Transfer/Sources/Appwrite.php
PineappleIOnic 9879e86
Update src/Transfer/Cache.php
PineappleIOnic effcf8e
Continue work on suggestions
PineappleIOnic ba56752
Continue work on suggestions
PineappleIOnic 7b5fe70
Handle pending status counter
PineappleIOnic 49578ad
Update CLI
PineappleIOnic 034c2dc
Add quick and dirty scope check for Firebase's Report function
PineappleIOnic 7fca998
Run Linter
PineappleIOnic 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 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,19 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
push: { branches: [main] } | ||
|
||
jobs: | ||
tests: | ||
name: Run Test Suite | ||
runs-on: ubuntu-latest | ||
env: | ||
COMPOSE_FILE: docker-compose.yml | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run Tests | ||
run: | | ||
docker-compose up -d --build && sleep 5 && docker compose exec tests php ./vendor/bin/phpunit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,37 @@ | ||
FROM postgres:alpine3.18 as supabase-db | ||
COPY ./tests/Transfer/resources/supabase/backup.tar /docker-entrypoint-initdb.d/backup.tar | ||
COPY ./tests/Transfer/resources/restore.sh /docker-entrypoint-initdb.d/restore.sh | ||
FROM supabase/postgres:15.1.0.96 as supabase-db | ||
COPY ./tests/Transfer/resources/supabase/1_globals.sql /docker-entrypoint-initdb.d/1_globals.sql | ||
COPY ./tests/Transfer/resources/supabase/2_main.sql /docker-entrypoint-initdb.d/2_main.sql | ||
RUN rm -rf /docker-entrypoint-initdb.d/migrate.sh | ||
|
||
FROM postgres:alpine3.18 as nhost-db | ||
COPY ./tests/Transfer/resources/nhost/backup.tar /docker-entrypoint-initdb.d/backup.tar | ||
COPY ./tests/Transfer/resources/restore.sh /docker-entrypoint-initdb.d/restore.sh | ||
COPY ./tests/Transfer/resources/nhost/1_globals.sql /docker-entrypoint-initdb.d/1_globals.sql | ||
COPY ./tests/Transfer/resources/nhost/2_main.sql /docker-entrypoint-initdb.d/2_main.sql | ||
|
||
# Use my fork of mockoon while waiting for range headers to be merged | ||
FROM node:14-alpine3.14 as mock-api | ||
FROM node:20.4-alpine3.17 as mock-api | ||
WORKDIR /app | ||
RUN git clone https://github.com/PineappleIOnic/mockoon.git . | ||
RUN apk add --no-cache git | ||
RUN git clone https://github.com/PineappleIOnic/mockoon.git | ||
WORKDIR /app/mockoon | ||
RUN git checkout origin/feat-implement-range | ||
RUN apk add python3 make gcc g++ | ||
RUN npm run bootstrap | ||
RUN npm run build:libs | ||
RUN npm run build:cli | ||
RUN mv ./packages/cli/dist/run /usr/local/bin/mockoon | ||
RUN cd packages/cli && npm install -g . | ||
RUN adduser --shell /bin/sh --disabled-password --gecos "" mockoon | ||
USER mockoon | ||
CMD mockoon-cli start --data /mockoon/api.json --port 80 --disable-log-to-file && tail -f /dev/null | ||
|
||
FROM composer:2.0 as composer | ||
|
||
WORKDIR /usr/local/src/ | ||
|
||
COPY composer.lock /usr/local/src/ | ||
COPY composer.json /usr/local/src/ | ||
|
||
RUN composer install --ignore-platform-reqs | ||
|
||
FROM php:8.0-fpm-alpine3.14 as tests | ||
FROM php:8.1.21-fpm-alpine3.18 as tests | ||
RUN set -ex && apk --no-cache add postgresql-dev | ||
RUN docker-php-ext-install pdo pdo_pgsql | ||
COPY ./src /usr/local/src | ||
COPY ./tests /usr/local/src/tests | ||
COPY --from=composer /usr/local/src/vendor /usr/local/src/vendor | ||
CMD php ./vendor/bin/phpunit | ||
COPY ./src /app/src | ||
COPY ./tests /app/src/tests | ||
COPY --from=composer /usr/local/src/vendor /app/vendor | ||
CMD tail -f /dev/null |
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this added only for testing or will it also be used in prod? Do we want to use the forked repo or the actual one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mockoon currently doesn't support range headers, I have a PR in the works to bring this feature over to their repo but currently I don't have the time to write tests for them so for now we are using my fork and will switch once I have more time to finish their tests and merge it into their repo