Skip to content

ci: removed event_name == 'push' actions #5

ci: removed event_name == 'push' actions

ci: removed event_name == 'push' actions #5

name: Integration Tests

Check failure on line 1 in .github/workflows/integration-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/integration-tests.yml

Invalid workflow file

(Line: 74, Col: 17): Unrecognized function: 'replace'. Located at position 1 within expression: replace(inputs.branch || github.ref_name, '/', '-'), (Line: 112, Col: 17): Unrecognized function: 'replace'. Located at position 1 within expression: replace(inputs.branch || github.ref_name, '/', '-')
on:
workflow_call:
inputs:
branch:
description: 'Branch to checkout and test'
required: false
type: string
default: ''
is_nightly:
description: 'Whether this is a nightly run'
required: false
type: boolean
default: false
changes_only:
description: 'Only build tests affected by changes'
required: false
type: boolean
default: false
commit_id:
description: 'Base commit ID for change comparison'
required: false
type: string
default: ''
jobs:
build-integration-tests:
runs-on: namespace-profile-large-ubuntu-24-04-amd64
outputs:
test_binaries: ${{ steps.build.outputs.test_binaries }}
steps:
- uses: actions/checkout@v4
with:
# Fetch the entire history.
fetch-depth: 0
ref: ${{ inputs.branch }}
- uses: ./.github/actions/bootstrap
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Setup pypy and link to the location expected by .cargo/config.toml.
- uses: actions/setup-python@v5
id: setup-pypy
with:
python-version: "pypy3.9"
cache: "pip"
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt
- name: "Build integration tests"
id: build
run: |
CMD="scripts/run_tests.py --command build_integration"
if [[ "${{ inputs.is_nightly }}" == "true" ]]; then
CMD="$CMD --is_nightly"
fi
if [[ "${{ inputs.changes_only }}" == "true" ]]; then
CMD="$CMD --changes_only --include_dependencies"
if [[ -n "${{ inputs.commit_id }}" ]]; then
CMD="$CMD --commit_id ${{ inputs.commit_id }}"
fi
fi
eval $CMD
- name: "Upload integration test binaries"
if: steps.build.outputs.test_binaries
uses: namespace-actions/upload-artifact@v1
with:
name: integration-test-binaries-${{ replace(inputs.branch || github.ref_name, '/', '-') }}
path: ./target/debug
compression-level: 0
run-integration-tests:
needs: build-integration-tests
if: needs.build-integration-tests.outputs.test_binaries
runs-on: namespace-profile-large-ubuntu-24-04-amd64
strategy:
fail-fast: false
matrix:
test_binary: ${{ fromJson(needs.build-integration-tests.outputs.test_binaries) }}
steps:
- uses: actions/checkout@v4
with:
# Fetch the entire history.
fetch-depth: 0
ref: ${{ inputs.branch }}
- uses: ./.github/actions/bootstrap
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Setup pypy and link to the location expected by .cargo/config.toml.
- uses: actions/setup-python@v5
id: setup-pypy
with:
python-version: "pypy3.9"
cache: "pip"
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- run: pip install -r scripts/requirements.txt
- name: "Download integration test binaries"
uses: namespace-actions/download-artifact@v1
with:
name: integration-test-binaries-${{ replace(inputs.branch || github.ref_name, '/', '-') }}
path: ./target/debug
- name: "Restore executable permissions"
run: |
chmod +x ./target/debug/apollo_node
chmod +x ./target/debug/${{ matrix.test_binary }}
- name: "Run ${{ matrix.test_binary }}"
run: ./target/debug/${{ matrix.test_binary }}
env:
SEED: 0