Only track versions when new version detected (#166) #461
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: "Tests" | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.sha || github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| Test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt update && sudo apt install libdw-dev | |
| cargo install cargo-sort | |
| rustup update | |
| rustup toolchain install nightly | |
| working-directory: aptos-indexer-processors-sdk | |
| - name: Build with No Default Features | |
| run: cargo build --no-default-features | |
| working-directory: aptos-indexer-processors-sdk | |
| - name: Run Tests | |
| id: tests | |
| continue-on-error: true # Allow workflow to continue if tests fail | |
| run: cargo test | |
| working-directory: aptos-indexer-processors-sdk | |
| - name: Notify Eco Infra Oncall about proto update failure | |
| if: | | |
| steps.tests.outcome == 'failure' && | |
| github.event_name == 'pull_request' && | |
| contains(github.event.pull_request.labels.*.name, 'indexer-sdk-update') | |
| uses: slackapi/slack-github-action@v1.24.0 | |
| with: | |
| # eco-infra-oncall channel. | |
| channel-id: 'C0468USBLQJ' | |
| slack-message: | | |
| :warning: Tests failed on PR with indexer-sdk-update label | |
| PR: ${{ github.event.pull_request.html_url }} | |
| Author: ${{ github.event.pull_request.user.login }} | |
| Title: ${{ github.event.pull_request.title }} | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |