Continuous integration #867
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: Continuous integration | |
on: | |
push: | |
branches: | |
- master | |
- release-** | |
pull_request: | |
branches: | |
- '**' | |
release: | |
types: [published] | |
jobs: | |
# Run unit tests | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
qgis_version: [focal-3.16, 3.22-jammy, latest] | |
env: | |
QGIS_TEST_VERSION: ${{ matrix.qgis_version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Package PyPI Packages | |
run: | | |
sudo ./scripts/package_pip_packages.sh | |
- name: Test on QGIS | |
run: docker-compose -f .docker/docker-compose.gh.yml run qgis /usr/src/.docker/run-docker-tests.sh | |
release: | |
runs-on: ubuntu-22.04 | |
env: | |
OSGEO_USERNAME: mkuhn | |
OSGEO_PASSWORD: ${{ secrets.OSGEO_PASSWORD }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TX_TOKEN: ${{ secrets.TX_TOKEN }} | |
GITHUB_REF: ${{ github.ref }} | |
if: ${{ github.event_name == 'release' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
sudo apt update && sudo apt install qtbase5-dev qttools5-dev-tools | |
sudo pip install qgis-plugin-ci | |
- name: Release | |
run: | | |
qgis-plugin-ci release ${GITHUB_REF##*/} --transifex-token ${TX_TOKEN} --github-token ${GITHUB_TOKEN} --osgeo-username ${OSGEO_USERNAME} --osgeo-password ${OSGEO_PASSWORD} | |
translations: | |
runs-on: ubuntu-22.04 | |
env: | |
TX_TOKEN: ${{ secrets.TX_TOKEN }} | |
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: sudo pip install qgis-plugin-ci | |
- name: 🌍 Push translations | |
run: | | |
qgis-plugin-ci push-translation ${TX_TOKEN} |