-
Notifications
You must be signed in to change notification settings - Fork 639
76 lines (63 loc) · 2.76 KB
/
mplfinance_checks.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
name: mplfinance Checks
on: [ workflow_dispatch, pull_request ]
jobs:
Regression_Tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10' ]
steps:
- name: Preliminary Information
run: |
echo "The job was automatically triggered by a ${{ github.event_name }} event."
echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
echo " "
echo "github.ref = ${{ github.ref }}"
echo "github.sha = ${{ github.sha }}"
echo "github.event.pull_request.head.ref = ${{ github.event.pull_request.head.ref }}"
echo "github.event.pull_request.head.sha = ${{ github.event.pull_request.head.sha }}"
echo "github.event.pull_request.base.ref = ${{ github.event.pull_request.base.ref }}"
echo "github.event.pull_request.base.sha = ${{ github.event.pull_request.base.sha }}"
echo " "
- name: Check out repository code
uses: actions/checkout@v2
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install My Package
run: pip install .
- name: Run Pytest
run: python -m pytest
- run: echo "This job's status is ${{ job.status }}."
Pull_Request_Updates_Version:
runs-on: ubuntu-20.04
if: github.event_name == 'pull_request'
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install packaging
- name: Fetch base and head on PR
if: ${{ github.event.pull_request.base.sha }}
run: |
git fetch origin master ${{ github.event.pull_request.base.sha }}
git fetch origin master ${{ github.event.pull_request.head.sha }}
- name: Check that Pull Request includes updating the Version
run: |
git show ${{ github.event.pull_request.base.sha }}:src/mplfinance/_version.py > scripts/tv0.py
git show ${{ github.sha }}:src/mplfinance/_version.py > scripts/tv1.py
python scripts/version_update_check.py tv0 tv1