Enabling cloud integration tests #2898
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
| name: Elixir CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| EXPLORER_BUILD: true | |
| MIX_ENV: test | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| include: | |
| - otp_version: 25.3 | |
| elixir_version: 1.14 | |
| - otp_version: "27.2" | |
| elixir_version: 1.18 | |
| runs-on: ubuntu-latest | |
| name: test | |
| services: | |
| localstack: | |
| image: localstack/localstack:s3-latest | |
| ports: | |
| - 4566:4566 | |
| env: | |
| SERVICES: s3 | |
| # Wait for LocalStack to be up and running | |
| options: >- | |
| --health-cmd "curl -f http://localhost:4566/_localstack/health || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| AWS_ACCESS_KEY_ID: test | |
| AWS_SECRET_ACCESS_KEY: test | |
| AWS_DEFAULT_REGION: us-east-1 | |
| AWS_ENDPOINT_URL: http://localhost:4566 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| _build/test/lib/explorer/native/explorer | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| key: test-native-${{ runner.os }}-${{ hashFiles('native/**/Cargo.lock') }} | |
| restore-keys: | | |
| test-native-${{ runner.os }} | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp_version }} | |
| elixir-version: ${{ matrix.elixir_version }} | |
| - name: Install deps | |
| run: mix deps.get | |
| - name: Compile deps | |
| run: mix deps.compile | |
| - name: Run tests | |
| run: mix test --warnings-as-errors | |
| - name: Run property tests | |
| run: mix test --only property --warnings-as-errors | |
| - name: Compile once again but without optional deps | |
| run: mix compile --force --warnings-as-errors --no-optional-deps | |
| - name: Run cloud integration tests | |
| run: | | |
| mix localstack.setup | |
| mix test --only cloud_integration | |
| format: | |
| runs-on: ubuntu-latest | |
| name: mix format | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: "27.2" | |
| elixir-version: 1.18 | |
| - run: mix format --check-formatted |