Skip to content

Merge pull request #343 from systemaccounting/342-transaction-by-id-rust #185

Merge pull request #343 from systemaccounting/342-transaction-by-id-rust

Merge pull request #343 from systemaccounting/342-transaction-by-id-rust #185

name: dev-integration
on:
push:
paths:
- 'services/graphql/**'
- 'services/rule/**'
- 'services/request-create/**'
- 'services/request-approve/**'
- 'services/balance-by-account/**'
- 'services/request-by-id/**'
- 'services/requests-by-account/**'
- 'services/transaction-by-id/**'
- 'services/transactions-by-account/**'
- 'migrations/schema/**'
- 'tests/**'
branches-ignore:
- 'master'
jobs:
integration:
name: integration test
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
CI: true
steps:
- uses: actions/checkout@v3
- name: install latest psql client
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install --yes --no-install-recommends postgresql-client
- name: install golang-migrate
run: |
curl -LO https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-amd64.deb
sudo dpkg -i migrate.linux-amd64.deb
rm migrate.linux-amd64.deb
- name: start services
run: make start
- name: test service integration
run: make -C ./tests test-local
- name: reset db
run: make reset-db
- name: e2e test client
run: make -C ./client test-ci
- name: set current env-id for cloud
run: make resume-dev ENV_ID=${{ secrets.DEV_ENV_ID }}
- name: install cargo cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: deploy to cloud
run: bash scripts/deploy-all.sh --env dev --transaction-services-only
- name: reset rds database for integration tests
run: make --no-print-directory -C ./migrations resetrds ENV=dev DB=test
- name: dump rds database locally for restore between integration tests
run: make --no-print-directory -C ./migrations/dumps dump-rds-testseed
- name: get secrets for dev integration tests
run: make --no-print-directory -C ./tests get-secrets ENV=dev
- name: run dev cloud integration tests
run: cargo test --manifest-path ./tests/Cargo.toml --features integration_tests -- --test-threads=1