First try at tom + resspect GHA #6
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: Tom tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
tom-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout RESSPECT | |
uses: actions/checkout@v4 | |
with: | |
path: resspect | |
- name: Checkout tom_desc | |
uses: actions/checkout@v4 | |
with: | |
repository: LSSTDESC/tom_desc | |
path: tom_desc | |
submodules: 'recursive' | |
- name: Unpack test files | |
working-directory: tom_desc/tests | |
run: | | |
tar xf elasticc2_alert_test_data.tar.bz2 | |
- name: Bring docker environments up | |
working-directory: resspect | |
env: | |
TOM_DESC_DIR: ../tom_desc | |
run: | | |
docker compose up -d shell resspect | |
- name: Load the TOM Database | |
working-directory: resspect | |
run: | | |
docker compose exec -it shell /bin/bash -c "PGPASSWORD=fragile pg_restore --create -h postgres -U postgres -d tom_desc /tests/elasticc2_alertcycle_complete.psqlc" | |
- name: Run one night of processing | |
working-directory: resspect | |
run: | | |
docker compose exec -it resspect /bin/bash -c "python3 /resspect/resspect-src/src/resspect/scripts/run_one_night.py" | |
- name: Check the night of processing worked | |
working-directory: resspect | |
run: | | |
docker compose exec -it resspect /bin/bash -c "python3 /resspect/resspect-src/src/resspect/scripts/test_tom_received_requests.py" | |