Skip to content

Commit

Permalink
Bye bye Travis, welcome GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Mar 31, 2021
1 parent 865cd33 commit 72d5a76
Show file tree
Hide file tree
Showing 13 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .docker/exec.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
export $(grep -v '^#' .env | xargs)

docker exec -it qgis sh \
docker exec -t qgis sh \
-c "cd /tests_directory/${PLUGIN_NAME} && qgis_testrunner.sh qgis_plugin_tools.infrastructure.test_runner.test_package"
2 changes: 1 addition & 1 deletion .docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ echo "Wait 10 seconds"
sleep 10
if [ "$WITH_QGIS" = with-qgis ]; then
echo "Installation of the plugin ${PLUGIN_NAME}"
docker exec -it qgis sh -c "qgis_setup.sh ${PLUGIN_NAME}"
docker exec -t qgis sh -c "qgis_setup.sh ${PLUGIN_NAME}"
echo "Setup the database link from QGIS"
docker cp postgis_connexions.ini qgis:/tmp
docker exec qgis bash -c "cat /tmp/postgis_connexions.ini >> /root/.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini"
Expand Down
22 changes: 0 additions & 22 deletions .github/push_to_github.sh

This file was deleted.

107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: 🎳 Tests

on:
push:
tags:
- '*'
branches:
- '*'
pull_request:

jobs:
unittests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .docker

steps:
- name: Check out repository
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Launching docker-compose
run: ./start.sh with-qgis

- name: Running tests
run: ./exec.sh

migration:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .docker

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Launching docker-compose
run: ./start.sh

- name: Running tests
run: ./install_migrate_generate.sh

flake8:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
architecture: x64

- name: Checkout
uses: actions/checkout@master

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python requirements
run: pip install -r requirements/requirements-dev.txt

- name: Run flake8
run: flake8

packaging:
needs: [flake8, unittests, migration]
runs-on: ubuntu-latest
if: github.repository == '3liz/qgis-gestion_base_adresse-plugin' && contains(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install qgis-plugin-ci
run: pip3 install qgis-plugin-ci==1.8.4

- name : Fetch current changelog
run: |
qgis-plugin-ci changelog ${GITHUB_REF/refs\/tags\//} >> release.md
cat release.md
- name: Create release on GitHub
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.BOT_HUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: release.md

- name: Package the plugin and deploy it in the release
run: >-
qgis-plugin-ci
release ${GITHUB_REF/refs\/tags\//}
--github-token ${{ secrets.BOT_HUB_TOKEN }}
--create-plugin-repo
23 changes: 0 additions & 23 deletions .github/workflows/flake8.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/publish-doc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Github Pages
name: 📖 Deploy documentation

on:
push:
Expand Down Expand Up @@ -32,15 +32,15 @@ jobs:
uses: actions/[email protected]
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-doc.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/requirements-doc.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements-doc.txt
python -m pip install -r requirements/requirements-doc.txt
- name: Copy CHANGELOG.md and CONTRIBUTING.md
run: |
Expand Down
65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Le projet est hébergé sur GitHub

Le code SQL et Python sont couverts par des tests unitaires utilisant Docker.

[![Flake8](https://github.com/3liz/qgis-gestion_base_adresse-plugin/actions/workflows/flake8.yml/badge.svg)](https://github.com/3liz/qgis-gestion_base_adresse-plugin/actions/workflows/flake8.yml)
[![🎳 Tests](https://github.com/3liz/qgis-gestion_base_adresse-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/3liz/qgis-gestion_base_adresse-plugin/actions/workflows/ci.yml)

```bash
pip install -r requirements-dev.txt
Expand All @@ -30,6 +30,6 @@ del os.environ['TEST_DATABASE_INSTALL_ADRESSE'] # Disable
La documentation utilise [MkDocs](https://www.mkdocs.org/) avec [Material](https://squidfunk.github.io/mkdocs-material/) :

```bash
pip install -r requirements-doc.txt
pip install -r requirements/requirements-doc.txt
mkdocs serve
```
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Gestion des adresses

[![🎳 Tests](https://github.com/3liz/qgis-gestion_base_adresse-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/3liz/qgis-gestion_base_adresse-plugin/actions/workflows/ci.yml)

L'aide concernant l'installation, l'utilisation, le module Lizmap, la base de données etc se trouvent sur
[docs.3liz.org](https://docs.3liz.org/qgis-gestion_base_adresse-plugin/).

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ theme:
features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.top

extra:
social:
Expand Down
1 change: 0 additions & 1 deletion requirements-doc.txt

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions requirements/requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mkdocs-material>=7.1.0,<7.2.0

0 comments on commit 72d5a76

Please sign in to comment.