-
Notifications
You must be signed in to change notification settings - Fork 29
48 lines (46 loc) · 1.44 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
name: Run Unit Test via Pytest
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
env:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
python_version: "3.10"
timezone: "Europe/Berlin"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.python_version }}
- name: Install the rclone software
run: sudo -v ; curl https://rclone.org/install.sh | sudo bash
- name: Setup rclone config file
run: |
mkdir -p ~/.config/rclone
echo "$rclone_config" > ~/.config/rclone/rclone.conf
rclone listremotes
- name: Set timezone
run: |
sudo timedatectl set-timezone ${{ env.timezone }}
timedatectl
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Run test suite
run: |
pytest -v
- name: Update rclone config file secret
run: cat ~/.config/rclone/rclone.conf | gh secret set RCLONE_CONFIG
env:
rclone_config_secret_name: RCLONE_CONFIG
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GH_REPO: ${{ github.repository }}