Skip to content

Commit

Permalink
Add new workflow: test
Browse files Browse the repository at this point in the history
  • Loading branch information
aokumasan committed Jul 31, 2023
1 parent 25ed34b commit 0451506
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]
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 pipenv
run: pip install pipenv==2023.5.19

- name: Install dependencies
run: pipenv install --skip-lock -d

- name: Check isort
run: pipenv run isort . --check-only --diff --quiet

- name: Check flake8
run: pipenv run lint
18 changes: 11 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: Test
on: [push, pull_request]
env:
NIFCLOUD_DEFAULT_REGION: 'jp-east-1'
NIFCLOUD_ACCESS_KEY_ID: ${{ secrets.NIFCLOUD_ACCESS_KEY_ID }}
NIFCLOUD_SECRET_ACCESS_KEY: ${{ secrets.NIFCLOUD_SECRET_ACCESS_KEY }}
NIFCLOUD_STORAGE_ACCESS_KEY_ID: ${{ secrets.NIFCLOUD_STORAGE_ACCESS_KEY_ID }}
NIFCLOUD_STORAGE_SECRET_ACCESS_KEY: ${{ secrets.NIFCLOUD_STORAGE_SECRET_ACCESS_KEY }}
jobs:
lint:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: [3.11]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -21,8 +28,5 @@ jobs:
- name: Install dependencies
run: pipenv install --skip-lock -d

- name: Check isort
run: pipenv run isort . --check-only --diff --quiet

- name: Check flake8
run: pipenv run lint
- name: Run tests
run: pipenv run test

0 comments on commit 0451506

Please sign in to comment.