-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from Travis CI to GitHub Actions (wip)
- Loading branch information
Showing
5 changed files
with
82 additions
and
70 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
[run] | ||
branch = True | ||
relative_files = True | ||
source = | ||
hub | ||
kpi | ||
|
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,59 @@ | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: pytest | ||
|
||
on: | ||
push: | ||
branches: [ master, beta ] | ||
pull_request: | ||
branches: [ master, beta ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
DATABASE_URL: postgis://kobo:kobo@localhost:5432/kpi_test | ||
DJANGO_LANGUAGE_CODES: "en ar es fr hi ku pl pt zh-hans" | ||
DJANGO_SECRET_KEY: notSecretJustForTestingYep | ||
DJANGO_SETTINGS_MODULE: kobo.settings.testing | ||
REDIS_SESSION_URL: redis://localhost:6379 | ||
strategy: | ||
matrix: | ||
python-version: ['3.8'] | ||
services: | ||
postgres: | ||
image: postgis/postgis:9.5-2.5 | ||
env: | ||
POSTGRES_USER: kobo | ||
POSTGRES_PASSWORD: kobo | ||
POSTGRES_DB: kpi_test | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
redis_cache: | ||
image: redis:3.2 | ||
ports: | ||
- 6379:6379 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
- name: Install pip-tools | ||
run: python -m pip install pip-tools | ||
- name: Update Debian package lists | ||
run: sudo DEBIAN_FRONTEND=noninteractive apt-get -y update | ||
- name: Install Debian dependencies | ||
run: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential fontforge gettext git-core libpcre3 libpcre3-dev libpq-dev | ||
- name: Install Python dependencies | ||
run: pip-sync dependencies/pip/dev_requirements.txt | ||
- name: Update translations | ||
run: git submodule init && git submodule update --remote && python manage.py compilemessages | ||
- name: Run pytest | ||
run: pytest --cov=. -vvra | ||
- name: Run coveralls | ||
uses: AndreMiras/coveralls-python-action@develop | ||
# TODO: npm install; npm run copy-fonts; npm run build; npm run test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
-r requirements.in | ||
|
||
Fabric | ||
coverage | ||
coveralls | ||
ipython | ||
pytest-django | ||
pytest-env | ||
pytest | ||
mock | ||
mongomock | ||
pytest | ||
pytest-cov | ||
pytest-django | ||
pytest-env |
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