Browse Source
Merge pull request #1120 from doccano/enhancement/GitHubActions
Add GitHub actions for unit testing
pull/1121/head
Hiroki Nakayama
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
45 additions and
1 deletions
-
.github/workflows/ci.yml
-
Pipfile
-
Pipfile.lock
|
@ -0,0 +1,29 @@ |
|
|
|
|
|
name: doccano CI |
|
|
|
|
|
|
|
|
|
|
|
on: [push, pull_request] |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
|
|
build: |
|
|
|
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
- name: Set up Python 3.8 |
|
|
|
|
|
uses: actions/setup-python@v2 |
|
|
|
|
|
with: |
|
|
|
|
|
python-version: 3.8 |
|
|
|
|
|
- name: Install dependencies |
|
|
|
|
|
run: | |
|
|
|
|
|
python -m pip install --upgrade pip |
|
|
|
|
|
pip install pipenv |
|
|
|
|
|
pipenv sync --dev |
|
|
|
|
|
- name: Run migrations |
|
|
|
|
|
run: | |
|
|
|
|
|
pipenv run wait_for_db |
|
|
|
|
|
pipenv run migrate |
|
|
|
|
|
working-directory: ./app |
|
|
|
|
|
- name: Run tests |
|
|
|
|
|
run: | |
|
|
|
|
|
pipenv run test |
|
|
|
|
|
working-directory: ./app |
|
@ -40,6 +40,13 @@ whitenoise = "*" |
|
|
dj-database-url = "*" |
|
|
dj-database-url = "*" |
|
|
python-jose = "*" |
|
|
python-jose = "*" |
|
|
pyexcel-xlsx = "*" |
|
|
pyexcel-xlsx = "*" |
|
|
|
|
|
lockfile = "*" |
|
|
|
|
|
|
|
|
[requires] |
|
|
[requires] |
|
|
python_version = "3.8" |
|
|
python_version = "3.8" |
|
|
|
|
|
|
|
|
|
|
|
[scripts] |
|
|
|
|
|
isort = "isort . -c" |
|
|
|
|
|
wait_for_db = "python manage.py wait_for_db" |
|
|
|
|
|
test = "python manage.py test api.tests" |
|
|
|
|
|
migrate = "python manage.py migrate" |
|
@ -1,7 +1,7 @@ |
|
|
{ |
|
|
{ |
|
|
"_meta": { |
|
|
"_meta": { |
|
|
"hash": { |
|
|
"hash": { |
|
|
"sha256": "7a101e25710dcef37ef85bbe7c5f3dd6b32e9e0af6e464f640433484e8534340" |
|
|
|
|
|
|
|
|
"sha256": "c526ff500b5455d7a06d1c54ffe82f875617ed24cb53ac309b0414bd15e539eb" |
|
|
}, |
|
|
}, |
|
|
"pipfile-spec": 6, |
|
|
"pipfile-spec": 6, |
|
|
"requires": { |
|
|
"requires": { |
|
@ -315,6 +315,14 @@ |
|
|
], |
|
|
], |
|
|
"version": "==0.1.0" |
|
|
"version": "==0.1.0" |
|
|
}, |
|
|
}, |
|
|
|
|
|
"lockfile": { |
|
|
|
|
|
"hashes": [ |
|
|
|
|
|
"sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799", |
|
|
|
|
|
"sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa" |
|
|
|
|
|
], |
|
|
|
|
|
"index": "pypi", |
|
|
|
|
|
"version": "==0.12.2" |
|
|
|
|
|
}, |
|
|
"markupsafe": { |
|
|
"markupsafe": { |
|
|
"hashes": [ |
|
|
"hashes": [ |
|
|
"sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", |
|
|
"sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", |
|
|