forked from 8go/matrix-commander
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (57 loc) · 2.17 KB
/
run-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
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
# This is a basic workflow to perform automated tests with Actions
name: Run tests from tests directory
on:
push:
branches: [ "master", "*" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
env:
python-version: ""
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Install system dependencies
run: sudo apt install libdbus-1-dev libolm-dev
- name: Upgrade PIP
run: python -m pip install --upgrade pip
- name: Install requirements for Matrix Commander
run: pip install -r requirements.txt
- name: Source install of Matrix Commander
run: pip install .
- name: Python version
run: python --version
- name: ls
run: ls
- name: ls matrix_commander
run: ls matrix_commander
- name: Test version
run: ./tests/test-version.sh
- name: Log in to matrix server
env:
MATRIX_HOMESERVER: ${{ secrets.MATRIX_HOMESERVER }}
MATRIX_HOMESERVER_DOMAIN: ${{ secrets.MATRIX_HOMESERVER_DOMAIN }}
MATRIX_ROOM: ${{ secrets.MATRIX_ROOM }}
MATRIX_USERNAME: ${{ secrets.MATRIX_USERNAME }}
MATRIX_PASSWORD: ${{ secrets.MATRIX_PASSWORD }}
run: matrix-commander --login password --user-login "${MATRIX_USERNAME}" --password "${MATRIX_PASSWORD}" --homeserver "${MATRIX_HOMESERVER}" --device "ci" --room-default "${MATRIX_ROOM}" -m "matrix-commander posted from CI (${GITHUB_REPOSITORY} / ${GITHUB_REF})"
- name: Test events
run: ./tests/test-event.sh
- name: Test delete event
run: ./tests/test-delete.sh
- name: Test REST
run: ./tests/test-rest.sh
- name: Test set/get
run: ./tests/test-setget.sh
- name: Test send
run: python ./tests/test-send.py
- name: Test upload
run: ./tests/test-upload.sh
- name: Log out of matrix server
run: matrix-commander -m "matrix-commander CI log out" --logout me