-
Notifications
You must be signed in to change notification settings - Fork 6
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 #1 from rudexi/testing
Testing
- Loading branch information
Showing
16 changed files
with
1,557 additions
and
1,689 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
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,40 +1,64 @@ | ||
# vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab: | ||
--- | ||
name: Snooze-server testing | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
tests: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
if: ${{ false }} # Disabled for now | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
architecture: 'x64' | ||
|
||
- name: Install Poetry | ||
run: python -m pip install 'poetry>=1.2.0a2' | ||
|
||
- name: Cache Poetry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.local/share/virtualenvs | ||
key: "{{ runner.os }}-poetry-dev-{{ hashFIles('**/poetry.lock') }}" | ||
|
||
- name: Install dependencies | ||
if: steps.cache-poetry.outputs.cache-hit != 'true' | ||
run: poetry install --only lint | ||
|
||
- name: Running Pylint | ||
run: poetry run pylint snooze/ | ||
|
||
tests: | ||
# needs: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
build-essential \ | ||
python3-dev | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
python-version: '3.6' | ||
architecture: 'x64' | ||
|
||
- name: Install Poetry | ||
run: python -m pip install 'poetry>=1.2.0a2' | ||
|
||
- name: Cache Poetry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.local/share/virtualenvs | ||
key: "{{ runner.os }}-poetry-test-{{ hashFIles('**/poetry.lock') }}" | ||
|
||
- name: Install dependencies | ||
id: install-deps | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install \ | ||
pytest \ | ||
pytest-data \ | ||
pytest-mongodb \ | ||
pytest-spec \ | ||
pytest-timeout \ | ||
freezegun | ||
pip install -r requirements.txt | ||
pip install . | ||
if: steps.cache-poetry.outputs.cache-hit != 'true' | ||
run: poetry install --only default --only test | ||
|
||
- name: Running Pytest | ||
id: pytest | ||
run: | | ||
pytest | ||
run: poetry run pytest | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.