diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 560b43e..a1a1fcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,14 @@ jobs: test: name: test runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + qgis: + - latest + - release-3_16 + - release-3_10 + - release-3_4 env: LDI_LINZ_KEY: ${{ secrets.LDI_LINZ_KEY }} LDI_MFE_KEY: ${{ secrets.LDI_MFE_KEY }} @@ -23,7 +31,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Run test script - run: ./test.bash "$LDI_LINZ_KEY" "$LDI_MFE_KEY" "$LDI_NZDF_KEY" "$LDI_BASEMAPS_KEY" + run: | + ./test.bash "${{ matrix.qgis }}" "$LDI_LINZ_KEY" "$LDI_MFE_KEY" "$LDI_NZDF_KEY" "$LDI_BASEMAPS_KEY" deploy: diff --git a/README.md b/README.md index 7dfcffa..54bbfec 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,9 @@ Please see the [LINZ-Data-Importer](https://github.com/linz/linz-data-importer/) are executed via [GitHub Actions](https://github.com/linz/linz-data-importer/actions) for branches listed in the [`ci.yml`](https://github.com/linz/linz-data-importer/blob/master_qgis3/.github/workflows/ci.yml) file. These tests are against an instance of QGIS within a Docker container as made possible by the -[elpaso's Docker container](https://hub.docker.com/r/elpaso/qgis-testing-environment). +[official Docker container](https://hub.docker.com/r/qgis/qgis). -You can run the tests using the test.bash script: `./test.bash LDI_LINZ_KEY LDI_MFE_KEY LDI_NZDF_KEY LDI_BASEMAPS_KEY`. You can request the keys in these places: +You can run the tests using the test.bash script: `./test.bash QGIS_VERSION LDI_LINZ_KEY LDI_MFE_KEY LDI_NZDF_KEY LDI_BASEMAPS_KEY`. The QGIS version is one of the [official Docker image tags](https://hub.docker.com/r/qgis/qgis/tags). You can request the keys in these places: - [LDI_LINZ_KEY](https://data.linz.govt.nz/my/api/) - [LDI_MFE_KEY](https://data.mfe.govt.nz/my/api/) diff --git a/test.bash b/test.bash index 32e1896..0c05738 100755 --- a/test.bash +++ b/test.bash @@ -4,7 +4,10 @@ set -o errexit -o nounset usage() { cat >&2 << 'EOF' -./test.bash "$ldi_linz_key" "$ldi_mfe_key" "$ldi_nzdf_key" "$ldi_basemaps_key" +Synopsis: ./test.bash "$qgis_version" "$ldi_linz_key" "$ldi_mfe_key" "$ldi_nzdf_key" "$ldi_basemaps_key" +Example: ./test.bash latest a1 b2 c3 d4 + +The QGIS version has to be one of the official QGIS Docker image tags . EOF } @@ -30,19 +33,19 @@ do esac done -if [[ $# -ne 4 ]] +if [[ $# -ne 5 ]] then usage exit 2 fi -export LDI_LINZ_KEY="$1" -export LDI_MFE_KEY="$2" -export LDI_NZDF_KEY="$3" -export LDI_BASEMAPS_KEY="$4" +qgis_version_tag="$1" +export LDI_LINZ_KEY="$2" +export LDI_MFE_KEY="$3" +export LDI_NZDF_KEY="$4" +export LDI_BASEMAPS_KEY="$5" image='qgis/qgis' -qgis_version_tag='latest' plugin_name='linz-data-importer' image_name="${image}:${qgis_version_tag}" container_name="${image/\//-}-${qgis_version_tag}"