From d06965332ad73299fad0120d611ca4b1d2ec89d8 Mon Sep 17 00:00:00 2001 From: Emma Ai Date: Tue, 5 Sep 2023 07:34:38 +0000 Subject: [PATCH] Revert "remove integration test since dea-notebooks not working on 3.10" This reverts commit 65415819cf67cce8b8b482e6fa5889c8b5a7ab65. --- .github/workflows/integration-test.yml | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/integration-test.yml diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml new file mode 100644 index 00000000..a83426b3 --- /dev/null +++ b/.github/workflows/integration-test.yml @@ -0,0 +1,61 @@ +--- +name: Integration Test + +on: + pull_request: + branches: + - develop + paths: + - '.github/workflows/integration-test.yml' + - 'docker/**' + + push: + branches: + - develop + paths: + - '.github/workflows/integration-test.yml' + - 'docker/**' + + release: + types: [published] + +permissions: + id-token: write + contents: read + +jobs: + integration-test: + runs-on: ubuntu-latest + steps: + - name: git checkout dea-sandbox + uses: actions/checkout@v3 + with: + path: dea-sandbox + + - name: git checkout dea-notebooks + uses: actions/checkout@v3 + with: + repository: GeoscienceAustralia/dea-notebooks + path: dea-notebooks + ref: stable + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: arn:aws:iam::538673716275:role/github-actions-role-readonly + aws-region: ap-southeast-2 + + - name: Copy tide modelling files with the AWS CLI + run: aws s3 sync s3://dea-non-public-data/tide_models/tide_models tide_models + + - name: Start docker-compose + run: | + sudo chown -R 1000:100 ./dea-notebooks + cd ./dea-sandbox/integration-testing + CURRENT_UID=1000:100 docker-compose up -d + + - name: Set up Datacube and Test + run: | + cd ./dea-sandbox/integration-testing + docker-compose exec -T sandbox ./dea-notebooks/Tests/setup_test_datacube.sh + docker-compose exec -T sandbox ./dea-notebooks/Tests/test_notebooks.sh