fix: handle migration path conflicts for identical database declarati… #782
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
--- | |
name: Test nitric run | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
types: [labeled] | |
concurrency: | |
group: ci-aws-e2e-tests-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
GOPROXY: https://proxy.golang.org | |
AWS_REGION: us-east-1 | |
FATHOM_SITE: ${{ vars.FATHOM_SITE }} | |
jobs: | |
e2e-aws: | |
if: ${{ github.event.label.name == 'e2e-aws' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: cli | |
- name: checkout the test app | |
uses: actions/checkout@v3 | |
with: | |
repository: nitrictech/test-app | |
path: test-app | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21 | |
- name: Build Nitric | |
run: | | |
cd ${{ github.workspace }}/cli | |
make build | |
mv bin/nitric $(go env GOPATH)/bin/nitric | |
- name: install-aws-cli | |
uses: unfor19/[email protected] | |
with: | |
arch: amd64 | |
- name: Nitric UP | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
cd ${{ github.workspace }}/test-app | |
nitric up -s aws --ci | |
- name: Set api endpoint | |
id: vars | |
run: echo "::set-output name=apiendpoint::$(cat ~/.pulumi/stacks/testr-aws.json|jq '.checkpoint.latest.resources[] | select(.type==\"aws:apigatewayv2/api:Api\").outputs.apiEndpoint')" | |
- name: Run Tests | |
env: | |
BASE_URL: ${{ steps.vars.outputs.apiendpoint }} | |
run: | | |
cd ${{ github.workspace }}/test-app | |
make test | |
cleanup-aws: | |
runs-on: ubuntu-latest | |
needs: e2e-aws | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21 | |
- name: Build Nitric | |
run: | | |
if ! [ -f $(go env GOPATH)/bin/nitric ]; then | |
cd ${{ github.workspace }}/cli | |
make build | |
mv bin/nitric $(go env GOPATH)/bin/nitric | |
fi | |
- name: Nitric Down | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
cd ${{ github.workspace }}/test-app | |
nitric down -s aws --ci -y |