Skip to content

Workflow file for this run

# ---
# name: Tests
# on:
# pull_request:
# branches:
# - 'develop'
# - 'tests_validation'
# paths:
# - '**'
# - '.github/workflows/test.yml'
# - '!docs/**'
# - '!*.rst'
# - '!*.md'
# workflow_dispatch:
# push:
# branches:
# - 'develop'
# - 'tests_validation'
# paths:
# - '**'
# - '.github/workflows/test.yml'
# - '!docs/**'
# - '!*.rst'
# - '!*.md'
# permissions:
# id-token: write # This is required for requesting the JWT
# contents: write # This is required for actions/checkout
# jobs:
# integration-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Configure AWS credentials from Test account
# uses: aws-actions/configure-aws-credentials@v1
# with:
# role-to-assume: arn:aws:iam::538673716275:role/github-actions-dea-coastlines-s3-role
# aws-region: ap-southeast-2
# - name: Copy files to the test website 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: Run dockerized integration tests and copy outputs
# run: |
# # Set up artifacts directory to house outputs from integration tests,
# # giving all users read and write permissions
# mkdir artifacts
# chmod a+rw artifacts
# # Run integration tests using Docker
# docker-compose up -d
# docker-compose exec -T coastline /bin/sh -c "sh ./docker/coastline/run_tests"
# docker-compose down
# # Copy out validation outputs produced by the integration tests and place them
# # in correct output locations so they can be committed back into the repository
# cp ./artifacts/stats_tests.png ./tests/stats_tests.png
# cp ./artifacts/stats_tests.csv ./data/validation/processed/stats_tests.csv
# cp ./artifacts/README.md ./tests/README.md
# # - name: Setup upterm session
# # uses: lhotari/action-upterm@v1
# # Commit validation results produced by integration tests back into repo
# - uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: Automatically update integration test validation results
# file_pattern: 'tests/stats_tests.png data/validation/processed/stats_tests.csv tests/README.md'
# # Add output GeoPackage data to Actions artifact so it can be downloaded
# - uses: actions/upload-artifact@v3
# with:
# name: output_geopackage
# path: ./artifacts/coastlines_tests.gpkg
# # Add output ESRI Shapefile data to Actions artifact so it can be downloaded
# - uses: actions/upload-artifact@v3
# with:
# name: output_shps
# path: ./artifacts/coastlines_tests.shp.zip
# # Add output test results 1
# - uses: actions/upload-artifact@v3
# with:
# name: test_results
# path: ./artifacts/stats_tests.png
# # Add output test results 2
# - uses: actions/upload-artifact@v3
# with:
# name: test_results
# path: ./artifacts/stats_tests.csv
# # Update code coverage
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# directory: ./artifacts/
# fail_ci_if_error: false