-
Notifications
You must be signed in to change notification settings - Fork 101
50 lines (44 loc) · 1.28 KB
/
pytest.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
# GitHub Action for running
name: pytest
on:
pull_request:
branches:
- master
schedule:
- cron: "0 12 * * SUN"
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- id: cache-pipenv
uses: actions/cache@v1
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pipenv install --dev -e .
- name: Create credentials.cfg
run: |
echo [CREDENTIALS] >> credentials.cfg
echo FPL_EMAIL="$FPL_EMAIL" >> credentials.cfg
echo FPL_PASSWORD="$FPL_PASSWORD" >> credentials.cfg
shell: bash
env:
FPL_EMAIL: ${{ secrets.FPL_EMAIL }}
FPL_PASSWORD: ${{ secrets.FPL_PASSWORD }}
- name: Run test suite
run: |
pipenv run pytest tests/
env:
FPL_EMAIL: ${{ secrets.FPL_EMAIL }}
FPL_PASSWORD: ${{ secrets.FPL_PASSWORD }}