-
Notifications
You must be signed in to change notification settings - Fork 345
42 lines (37 loc) · 996 Bytes
/
python.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
name: Test Python Files
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
jobs:
run-py:
strategy:
matrix:
py-version: [3.9]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{matrix.py-version}}
cache: pip
- name: Create, activate virtual environment and Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt --upgrade pip
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
- name: Run python files
run: |
source .venv/bin/activate
python .ci/scripts.py