-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (91 loc) · 3.32 KB
/
testing_checks.yaml
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
name: Enforcing testing checks
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
tags:
- v*
schedule:
# Every 01:00 Sunday re-run the test on the main branch
- cron: '0 1 * * 0'
workflow_dispatch:
jobs:
update_python:
runs-on: ubuntu-22.04
name: Running testing checks
steps:
- name: Current python version
run: python3 --version || echo python3 not installed
- name: Install Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
id: install_python_3_8
- name: Updated python version
run: python3 --version
- name: Install PDAL
run: sudo apt-get install -y --no-install-recommends pdal
- name: Update pip
run: python3 -m pip install --upgrade --no-cache-dir pip
id: pip-install
- name: Fetch/update setuptools
run: python3 -m pip install --upgrade --no-cache-dir setuptools
id: setuptools-install
- name: Update apt-get
run: sudo apt-get update
- name: Fetch/update pylint
run: python3 -m pip install --upgrade --no-cache-dir pylint
id: pylint-install
- name: Fetch source code
uses: actions/checkout@v2
id: fetch-source
- name: Finding files
run: find . -type f -name "*.py" > action_pylint_files.txt
id: find-python-files
- name: Install system requirements
shell: bash
run: 'sudo apt-get install -y python3-gdal gdal-bin libgdal-dev gcc g++ python3.8-dev'
id: install-gdal-other-reqs
- name: Install Python numpy
shell: bash
run: 'python3 -m pip install --upgrade --no-cache-dir numpy wheel'
id: install-python-numpy
- name: Install Python pygdal
shell: bash
run: 'sudo python3 -m pip install --no-cache-dir pygdal==3.4.1.*'
id: install-python-pygdal
- name: Install system requirements from source
shell: bash
run: '[ -s "packages.txt" ] && (cat packages.txt | sudo xargs apt-get install -y --no-install-recommends) || (echo "No additional packages to install")'
id: install-system-reqs
- name: Install Python requirements from source
shell: bash
run: '[ -s "requirements.txt" ] && (python3 -m pip install --no-cache-dir -r requirements.txt) || (echo "No Python packages to install")'
id: install-python-reqs
- name: check
shell: bash
run: ls
- name: Install agpypeline for tests
shell: bash
run: python3 -m pip install -e .
id: agpypeline_install
- name: Run action pylint script
shell: bash
run: '[ -s "action_pylint.sh" ] && (chmod +x "action_pylint.sh" && ./action_pylint.sh) || (echo "Not running special action script - empty or not found")'
id: run-special-action-script
- name: Fetching pylint.rc file
run: wget https://raw.githubusercontent.com/AgPipeline/Organization-info/master/pylint.rc
id: fetch_pylint_resource
- name: Listing
run: ls -la
- name: Files to be linted
run: cat action_pylint_files.txt
- name: Running pylint
run: cat action_pylint_files.txt | xargs python3 -m pylint --rcfile ./pylint.rc
- name: Running pytest
run: python3 -m pytest