Merge pull request #144 from planetlabs/remove_non_planet_data #339
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: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get source code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install plugin dependencies | |
run: pip install -r requirements.txt | |
- name: Setup | |
run: | | |
pip install paver | |
paver setup | |
- name: Build package | |
env: | |
SENTRY_KEY: ${{ secrets.SENTRY_KEY }} | |
SEGMENTS_KEY: ${{ secrets.SEGMENTS_KEY }} | |
GITHUB_REF: ${{ github.ref }} | |
GITHUB_SHA: ${{ github.sha}} | |
run: | | |
paver package.sentry=${SENTRY_KEY} package.segments=$SEGMENTS_KEY package.version=${GITHUB_SHA::7} package | |
mkdir tmp | |
unzip planet_explorer.zip -d tmp | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: planet_explorer_${{github.sha}} | |
path: tmp | |
install: | |
name: "Install" | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
qgis_version: [ release-3_10, release-3_16, release-3_24, release-3_26, release-3_28 ] | |
env: | |
QGIS_TEST_VERSION: ${{ matrix.qgis_version }} | |
# cf https://docs.qgis.org/3.16/en/docs/user_manual/introduction/qgis_configuration.html#running-qgis-with-advanced-settings | |
QGIS_COMMAND: qgis --noplugins --noversioncheck --nologo --version-migration --code ./planet_explorer/tests/install_plugin.py | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Download artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: planet_explorer_${{github.sha}} | |
path: tmp | |
- name: Zip artifact | |
run: (cd tmp && zip -r ../planet_explorer_${{github.sha}}.zip .) | |
- name: Pull qgis image | |
run: docker pull qgis/qgis:${QGIS_TEST_VERSION} | |
- name: Run install test | |
run: docker run --rm -v `pwd`:/tests_directory -t -w /tests_directory qgis/qgis:${QGIS_TEST_VERSION} sh -c "xvfb-run ${QGIS_COMMAND}" |