forked from IndustryEssentials/ymir
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.37 KB
/
command-pr.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: command-uniitest
on:
pull_request:
branches:
- master
- dev
- prerelease
jobs:
command-ci:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Cache Python Environment
uses: actions/cache@v3
with:
path: |
ymir/command/.mypy_cache
${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('ymir/command/requirements.txt', 'ymir/command/requirements-ci.txt') }}
- name: Install dependencies
run: |
time pip install -r requirements.txt
time pip install -r requirements-ci.txt
working-directory: ymir/command
- name: mypy
run: |
time mypy mir
working-directory: ymir/command
- name: flake8
run: |
time flake8 mir
working-directory: ymir/command
- name: Test with pytest
run: |
git config --global user.name 'CI-TEST'
git config --global user.email 'ci-test@ymir-team'
time python tests/__main__.py
working-directory: ymir/command