Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 40 additions & 39 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,50 +231,51 @@ jobs:
fi
make CERAMIC_ONE_IMAGE_TAG="${{ needs.build.outputs.image_tag }}" TEST_SELECTOR="$test_selector" HERMETIC_CMD=../bin/hermetic-driver hermetic-tests

run-migration-tests:
name: Run Migration Tests
runs-on: ubuntu-latest
environment: tnet-prod-2024
needs:
- build-driver
- publish-suite
- generate-matrix #Needed to know the BUILD_TAG
- build
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Setup GKE auth
uses: 'google-github-actions/auth@v1'
with:
credentials_json: ${{ secrets.GKE_SA_KEY }}
-
name: Get GKE credentials
uses: 'google-github-actions/get-gke-credentials@v1'
with:
cluster_name: ${{ vars.GKE_CLUSTER }}
location: ${{ vars.GKE_ZONE }}
- uses: actions/download-artifact@master
with:
name: hermetic-driver
path: ./bin
-
name: Test migration ${{ matrix.networks }}
run: |
set -euxo pipefail
cd tests
export BUILD_TAG=${{ needs.generate-matrix.outputs.build_tag }}
TEST_NETWORK=./migration-networks/basic-go-rust-post.yaml
chmod +x ../bin/hermetic-driver

make CERAMIC_ONE_IMAGE_TAG="${{ needs.build.outputs.image_tag }}" HERMETIC_CMD=../bin/hermetic-driver migration-tests
# run-migration-tests:
# name: Run Migration Tests
# runs-on: ubuntu-latest
# environment: tnet-prod-2024
# needs:
# - build-driver
# - publish-suite
# - generate-matrix #Needed to know the BUILD_TAG
# - build
# steps:
# -
# name: Checkout
# uses: actions/checkout@v3
# -
# name: Setup GKE auth
# uses: 'google-github-actions/auth@v1'
# with:
# credentials_json: ${{ secrets.GKE_SA_KEY }}
# -
# name: Get GKE credentials
# uses: 'google-github-actions/get-gke-credentials@v1'
# with:
# cluster_name: ${{ vars.GKE_CLUSTER }}
# location: ${{ vars.GKE_ZONE }}
# - uses: actions/download-artifact@master
# with:
# name: hermetic-driver
# path: ./bin
# -
# name: Test migration ${{ matrix.networks }}
# run: |
# set -euxo pipefail
# cd tests
# export BUILD_TAG=${{ needs.generate-matrix.outputs.build_tag }}
# TEST_NETWORK=./migration-networks/basic-go-rust-post.yaml
# chmod +x ../bin/hermetic-driver
#
# make CERAMIC_ONE_IMAGE_TAG="${{ needs.build.outputs.image_tag }}" HERMETIC_CMD=../bin/hermetic-driver migration-tests

integration-test-results:
name: Hermetic Test Results
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [run-integration-tests, run-migration-tests]
# needs: [run-integration-tests, run-migration-tests]
needs: [run-integration-tests]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
Expand Down
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ Using the makefile is not necessary during your development cycle, feel free to

However running `make` before publishing a PR will provide a good signal if you PR will pass CI.

### Migrations

If you need to add to the sqlite database schema, you will need to add a migration using the sqlx CLI.

```sh
cargo install sqlx-cli
# use the name of the migration and the source directory
sqlx migrate add -r "chain_proof" --source ./migrations/sqlite
```

After the up and down files are generated, write the apply/revert SQL in the up/down files. This will be applied automatically at startup.

### Testing Specific Changes

The above `make` targets test changes as a whole.
Expand Down
Loading