|
1 | | -# This workflow will install Python dependencies, run tests and lint with a single version of Python |
| 1 | +# This workflow will install Python dependencies, run tests and lint |
2 | 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
3 | 3 |
|
4 | 4 | # To ssh into this build add the following: |
|
11 | 11 | name: Execution Engine 2 Test Suite |
12 | 12 |
|
13 | 13 | on: |
14 | | - [pull_request] |
| 14 | + [ pull_request ] |
15 | 15 |
|
16 | 16 | jobs: |
17 | | - build: |
| 17 | + Lint_with_Black: |
18 | 18 | runs-on: ubuntu-latest |
| 19 | + name: Lint With Black |
19 | 20 | steps: |
20 | | - - uses: actions/checkout@v2 |
21 | | - - name: Set up Python 3.8 |
22 | | - uses: actions/setup-python@v2 |
23 | | - with: |
24 | | - python-version: 3.8 |
25 | | - - name: Lint with flake8 and black |
26 | | - run: | |
27 | | - python -m pip install --upgrade pip |
28 | | - pip install flake8 black pytest |
29 | | - flake8 ./lib ./test |
30 | | - black --check ./lib ./test |
31 | | - - name: Install dependencies |
32 | | - run: | |
33 | | - if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi |
34 | | - cd /opt |
35 | | - git clone https://github.com/kbase/jars |
36 | | - cd - |
37 | | - - name: Build Docker Image |
38 | | - run: | |
39 | | - docker build . -t execution_engine2:test |
40 | | - - name: Run Tests |
41 | | - run: | |
42 | | - docker-compose up -d |
43 | | - cp test/env/test.travis.env test.env |
44 | | - make test-coverage |
45 | | - codecov |
| 21 | + - uses: actions/checkout@v3 |
| 22 | + - uses: psf/black@stable |
| 23 | + with: |
| 24 | + options: "--check --verbose" |
| 25 | + src: "./lib" |
| 26 | + version: "22.10.0" |
| 27 | + - uses: psf/black@stable |
| 28 | + with: |
| 29 | + options: "--check --verbose" |
| 30 | + src: "./test" |
| 31 | + version: "22.10.0" |
| 32 | + |
| 33 | + Lint_with_Flake8: |
| 34 | + runs-on: ubuntu-latest |
| 35 | + name: Lint With Flake8 |
| 36 | + steps: |
| 37 | + - name: Check out source repository |
| 38 | + uses: actions/checkout@v3 |
| 39 | + - name: Set up Python environment |
| 40 | + uses: actions/setup-python@v4 |
| 41 | + with: |
| 42 | + python-version: "3.8" |
| 43 | + - name: flake8 Lint Lib |
| 44 | + uses: py-actions/flake8@v2 |
| 45 | + with: |
| 46 | + path: "./lib" |
| 47 | + - name: flake8 Lint Test |
| 48 | + uses: py-actions/flake8@v2 |
| 49 | + with: |
| 50 | + path: "./test" |
| 51 | + |
| 52 | + |
| 53 | + Build_and_Run_Tests_and_CodeCov: |
| 54 | + name: Build and Run Tests and CodeCov |
| 55 | + runs-on: ubuntu-latest |
| 56 | + steps: |
| 57 | + - name: Check out source repository |
| 58 | + uses: actions/checkout@v3 |
| 59 | + - name: Install dependencies |
| 60 | + run: | |
| 61 | + pip install -r requirements.txt |
| 62 | + git clone https://github.com/kbase/jars /opt/jars |
| 63 | + - name: Build Docker Image |
| 64 | + run: | |
| 65 | + docker build . -t execution_engine2:test |
| 66 | + - name: Run Tests |
| 67 | + run: | |
| 68 | + docker-compose up -d |
| 69 | + cp test/env/test.travis.env test.env |
| 70 | + make test-coverage |
| 71 | + codecov |
0 commit comments