-
Notifications
You must be signed in to change notification settings - Fork 10
50 lines (42 loc) · 1.34 KB
/
test.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
name: Test
on:
pull_request:
types: [ready_for_review]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest]
python-version: [ '3.8', '3.9', '3.10' ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Python version
run: python -c "import sys; print(sys.version)"
# Install pipenv
- name: Install pipenv
run: python3 -m pip install --upgrade pipenv
# create .venv folder
- name: create .venv folder
run: mkdir -p .venv
# caching dependencies
- name: Caching Dependencies
uses: actions/cache@v2
id: cache-dependencies
with:
path: .venv
key: ${{ matrix.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
# install dependencies
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
pipenv install --dev --verbose
pipenv install types-requests --dev
# Run bash script
- name: run Bash script
run: pipenv run bash ./.github/check.sh