-
-
Notifications
You must be signed in to change notification settings - Fork 2
112 lines (90 loc) · 2.52 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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-dev.txt
- name: Run flake8
run: flake8
packaging:
runs-on: ubuntu-latest
if: github.repository == '3liz/qgis-lizsync-plugin' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- name: Install Qt lrelease
run: |
sudo apt-get update
sudo apt-get install qt5-default qttools5-dev-tools
- 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 }}
--transifex-token ${{ secrets.TRANSIFEX_TOKEN }}
--create-plugin-repo