Andrey commited on
Commit
81b3b1b
1 Parent(s): 07c0225

Add ci/cd config.

Browse files
Files changed (1) hide show
  1. .github/workflows/ci.yml +53 -0
.github/workflows/ci.yml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This is a basic workflow to help you get started with Actions
2
+ # some parts are taken from here: https://github.com/ternaus/iglovikov_helper_functions/blob/master/.github/workflows/ci.yml
3
+ name: CI
4
+
5
+ # Controls when the action will run. Triggers the workflow on push or pull request
6
+ # events but only for the master branch
7
+ on:
8
+ push:
9
+ branches: [ master ]
10
+ pull_request:
11
+ branches: [ master ]
12
+
13
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
+ jobs:
15
+ # This workflow contains a single job called "build"
16
+ build:
17
+ # The type of runner that the job will run on
18
+ runs-on: ubuntu-latest
19
+
20
+ # Steps represent a sequence of tasks that will be executed as part of the job
21
+ steps:
22
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23
+ - uses: actions/checkout@v2
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v2
26
+ with:
27
+ python-version: '3.9.15'
28
+ - name: Cache pip
29
+ uses: actions/cache@v1
30
+ with:
31
+ path: ~/.cache/pip # This path is specific to Ubuntu
32
+ # Look to see if there is a cache hit for the corresponding requirements file
33
+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
34
+ restore-keys: |
35
+ ${{ runner.os }}-pip-
36
+ ${{ runner.os }}-
37
+ # You can test your matrix by printing the current Python version
38
+ - name: Display Python version
39
+ run: python -c "import sys; print(sys.version)"
40
+ - name: Install dependencies
41
+ run: |
42
+ python -m pip install --upgrade pip
43
+ pip install -r requirements.txt
44
+ pip install black flake8 mypy pytest
45
+ - name: Run black
46
+ run:
47
+ black --check .
48
+ - name: Run flake8
49
+ run: flake8
50
+ - name: Run Mypy
51
+ run: mypy --ignore-missing-imports --warn-no-return --warn-redundant-casts --disallow-incomplete-defs .
52
+ - name: tests
53
+ run: pytest