Version experiments #89
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: 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 | |
pull-requests: write # Required for validation results comment bot | |
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/fes2014 tide_models/fes2014 | |
aws s3 sync s3://dea-non-public-data/tide_models/tide_models/hamtide tide_models/hamtide | |
- 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: Extract requirements | |
run: | | |
cd ./dea-sandbox/integration-testing | |
docker-compose exec -T sandbox cat /tmp/requirements.txt > requirements.txt | |
- name: Read requirements | |
id: req | |
run: echo "content=$(cat ./dea-sandbox/integration-testing/requirements.txt)" >> $GITHUB_OUTPUT | |
# Post requirements as a comment on the PR | |
- name: Post validation results as comment | |
uses: mshick/add-pr-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
message: | | |
Installed packages: | |
${{ steps.req.outputs.content }} | |
- 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 |