fake PR to test wrap branch #87
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: ExascaleSandboxTests | |
on: | |
push: | |
branches: [ develop, main ] | |
pull_request: | |
branches: [ develop, main ] | |
workflow_dispatch: | |
jobs: | |
lint-check: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout repository | |
uses: actions/checkout@v4 | |
- | |
name: Format Check | |
run: | | |
pip install flake8 black isort | |
flake8 src tests | |
black src tests --check --diff | |
isort src tests --check --diff --profile black | |
build-and-test-chiltepin: | |
runs-on: ubuntu2204-16c-64g-600ssd | |
timeout-minutes: 360 | |
permissions: | |
packages: write | |
contents: read | |
pull-requests: write | |
steps: | |
- | |
name: Checkout repository | |
uses: actions/checkout@v4 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
logout: false | |
- | |
name: Prune pre-loaded GHA docker images | |
run: | | |
docker images | |
docker image prune -a -f | |
docker images | |
- | |
name: Start Slurm cluster containers | |
run: | | |
cd tests | |
export DOCKER_CLIENT_TIMEOUT=600 | |
export COMPOSE_HTTP_TIMEOUT=600 | |
docker compose version | |
docker compose -f docker-compose-test.yml config | |
docker images | |
docker ps -a | |
docker compose -f docker-compose-test.yml up -d | |
- | |
name: Copy test files to work directory | |
run: | | |
docker exec frontend bash -l -c "mkdir -p work; cd work ; cp -r ../chiltepin/* ." | |
- | |
name: Install chiltepin package | |
run: | | |
docker exec frontend bash -l -c "cd work ; module use /opt/spack-stack/envs/unified-env/install/modulefiles/Core ; module load stack-gcc; module load stack-openmpi; module load stack-python ; python -m venv create .chiltepin" | |
docker exec frontend bash -l -c "cd work ; source .chiltepin/bin/activate ; pip --use-deprecated=legacy-resolver install -r requirements.txt ; pip install -e ." | |
- | |
name: Run test suite | |
env: | |
GLOBUS_COMPUTE_CLIENT_ID: ${{ secrets.GC_CLIENT_ID }} | |
GLOBUS_COMPUTE_CLIENT_SECRET: ${{ secrets.GC_CLIENT_SECRET }} | |
run: | | |
docker exec -e GLOBUS_COMPUTE_CLIENT_ID="$GLOBUS_COMPUTE_CLIENT_ID" -e GLOBUS_COMPUTE_CLIENT_SECRET="$GLOBUS_COMPUTE_CLIENT_SECRET" frontend bash -l -c "cd work; source .chiltepin/bin/activate; cd tests ; PYTHONPATH=.. pytest -s -v --assert=plain --config=config.yaml --platform=docker" | |
- | |
name: Debug session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 60 | |
with: | |
limit-access-to-actor: true | |
- | |
name: Shut down Slurm cluster containers | |
run: | | |
cd tests | |
export DOCKER_CLIENT_TIMEOUT=600 | |
export COMPOSE_HTTP_TIMEOUT=600 | |
docker compose -f docker-compose-test.yml down | |
- | |
name: Add Test-MPAS-App label | |
run: | | |
curl \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.LABEL_PR }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \ | |
-d '{"labels":["Test-MPAS-App"]}' |