-
Notifications
You must be signed in to change notification settings - Fork 41
55 lines (44 loc) · 1.53 KB
/
tests.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
# This workflow will install Python dependencies, run tests with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: commcare-cloud tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: ["ubuntu-22.04"]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
env:
ANSIBLE_ROLES_PATH: "~/.ansible/roles"
CI_TEST: 1
TEST: main
steps:
- uses: actions/checkout@v3
- name: Set Up Commcare-Cloud Python Version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
source control/init.sh
# Note: the installs must be done in the following order, otherwise the installation of commcare-cloud
# tries to install from the commcare-cloud-bootstrap.egg_info directory
pip install -e .[test]
# setup 3.9 for deploy-stack
# may be removed when this file is updated to match global_vars/all.yml:python_version
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9 python3.9-venv
# Install virtualenv as an isolated global executable for deploy-stack in .tests/tests.sh
python3 -m pip install --user pipx
pipx install virtualenv
- name: Run tests
run: |
.tests/tests.sh