Skip to content

Commit

Permalink
Merge pull request #76 from nmasahiro/github-actions-lints-tests
Browse files Browse the repository at this point in the history
GitHub actions lints tests
  • Loading branch information
usaito authored Mar 7, 2021
2 parents d4c2502 + b66dd07 commit bb62a5b
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lints

on:
push:
branches:
- master
pull_request: {}

jobs:
lints:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Black
uses: psf/black@stable
with:
args: ". --check --diff"
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Tests

on:
push:
branches:
- master
pull_request: {}

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

# Not intended for forks.
if: github.repository == 'st-tech/zr-obp'

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Python${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install
run: |
python -m pip install --upgrade pip
pip install --progress-bar off -U setuptools
# Install pytest
pip install --progress-bar off .
pip install --progress-bar off pytest
- name: Tests
run: |
pytest tests
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ After installing flake8, you can check the coding style by the following command
# perform checking of the coding style
$ flake8 .
```

## Continuous Integration

Open Bandit Pipeline uses Github Actions to perform continuous integration.

0 comments on commit bb62a5b

Please sign in to comment.