Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 189
[WIP] Move CI to Github Actions#692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
54f1e0e9c76c3c65f40f6e1d7ae3637f19e9af2371File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Lint | ||
| on: | ||
| push: | ||
| branches-ignore: | ||
| - django-2.2 | ||
| pull_request: | ||
| branches-ignore: | ||
| - django-2.2 | ||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-16.04 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
| - name: Setup Python 3.8 | ||
| uses: actions/setup-python@v1 | ||
| with: | ||
| python-version: 3.8 | ||
| - name: Cache pip | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| ${{ runner.os }}- | ||
| - name: Install project dependencies | ||
| run: | | ||
| pip install --upgrade pip | ||
| pip install nox | ||
| pip install coveralls | ||
| - name: Check for linting issues | ||
| run: nox -s lint-3.8 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Test | ||
| on: | ||
| push: | ||
| branches-ignore: | ||
| - django-2.2 | ||
| pull_request: | ||
| branches-ignore: | ||
| - django-2.2 | ||
| jobs: | ||
| test: | ||
| strategy: | ||
| matrix: | ||
| python-version: [2.7, 3.5, 3.6, 3.7, 3.8] | ||
| runs-on: ubuntu-16.04 | ||
| env: | ||
| DJANGO_SETTINGS_MODULE: "settings.test_settings" | ||
| services: | ||
| postgres: | ||
| image: postgres:12.2 | ||
| ports: | ||
| - 5432:5432 | ||
| redis: | ||
| image: redis:6 | ||
| ports: | ||
| - 6379:6379 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
| # Python 3.5 needs to be set up here since Django 1.9 does not run beyond that | ||
| - name: Setup Python 3.5 | ||
| uses: actions/setup-python@v1 | ||
| with: | ||
| python-version: 3.5 | ||
| - name: Cache pip | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| ${{ runner.os }}- | ||
| - name: Install CI dependencies | ||
| run: | | ||
| pip install --upgrade pip | ||
| pip install celery==3.1.20 Django==1.9 # required for running celery | ||
| pip install nox | ||
| pip install codecov | ||
| - name: Run celery worker for tests | ||
| run: celery -A junction worker -l info --detach | ||
| - name: Run tests | ||
| run: nox -s test-${{ matrix.python-version }} | ||
| - name: Report coverage | ||
| uses: codecov/codecov-action@v1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -36,4 +36,4 @@ repos: | ||
| rev: stable | ||
| hooks: | ||
| - id: black | ||
| language_version: python3.6 | ||
| language_version: python3.8 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -20,7 +20,7 @@ jobs: | ||
| include: | ||
| # Basic Checks | ||
| - stage: primary | ||
| env: NOXSESSION=lint-3.5 | ||
| env: NOXSESSION=lint-3.8 | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe take out this change since we are planning to move away from Travis ? MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is why the PR is labelled | ||
| - env: NOXSESSION=test-2.7 | ||
| - env: NOXSESSION=test-3.5 | ||
| - env: NOXSESSION=docs | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be required here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. 👍