Skip to content

Commit bb62a5b

Browse files
authored
Merge pull request #76 from nmasahiro/github-actions-lints-tests
GitHub actions lints tests
2 parents d4c2502 + b66dd07 commit bb62a5b

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

.github/workflows/lints.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lints
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
9+
jobs:
10+
lints:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.7
21+
22+
- name: Black
23+
uses: psf/black@stable
24+
with:
25+
args: ". --check --diff"

.github/workflows/tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
python-version: [3.7, 3.8, 3.9]
16+
17+
# Not intended for forks.
18+
if: github.repository == 'st-tech/zr-obp'
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Setup Python${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install --progress-bar off -U setuptools
33+
34+
# Install pytest
35+
pip install --progress-bar off .
36+
37+
pip install --progress-bar off pytest
38+
39+
- name: Tests
40+
run: |
41+
pytest tests

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ After installing flake8, you can check the coding style by the following command
2929
# perform checking of the coding style
3030
$ flake8 .
3131
```
32+
33+
## Continuous Integration
34+
35+
Open Bandit Pipeline uses Github Actions to perform continuous integration.

0 commit comments

Comments
 (0)