diff --git a/.github/workflows/tom-tests.yml b/.github/workflows/tom-tests.yml new file mode 100644 index 00000000..b97324fe --- /dev/null +++ b/.github/workflows/tom-tests.yml @@ -0,0 +1,41 @@ +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 resspect + + - name: Run a command + working-directory: resspect + run: | + docker compose exec -it resspect /bin/bash -c "echo hello world" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 3fb8865c..e37bbbe4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,5 @@ +include: + - ${TOM_DESC_DIR:-../tom_desc}/tests/docker-compose.yaml services: resspect: tty: true @@ -20,10 +22,3 @@ services: - DB_HOST=resspectdb - DB_PORT=5432 - DB_NAME=resspectdb - networks: - - tom_desc_default - -networks: - tom_desc_default: - external: true -