-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from tk0miya/github_actions
Do test in GitHub Actions
- Loading branch information
Showing
3 changed files
with
79 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Test | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.5, 3.6, 3.7] | ||
max-parallel: 1 | ||
|
||
steps: | ||
- name: Print github context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo $GITHUB_CONTEXT | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: pycache | ||
uses: actions/cache@v2 | ||
id: pycache | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Setup python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install tox and test related | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Run tox | ||
run: | | ||
python -V | ||
tox -- -v --durations=25 | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
env: [flake8] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install tox and any other dependencies for test | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Run tox | ||
run: tox -e ${{ matrix.env }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters