Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdb62a4
commit 3a1dc4f
Showing
9 changed files
with
56 additions
and
43 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,46 @@ | ||
name: Pytest | ||
|
||
on: | ||
push: | ||
schedule: | ||
- cron: '0 8 * * *' | ||
|
||
jobs: | ||
run-tests: | ||
name: ${{ matrix.os }}, ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
max-parallel: 9 | ||
matrix: | ||
os: [ubuntu, windows, macOS] | ||
python-version: [3.5, 3.6, 3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dev dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install pytest-cov | ||
pip install flake8 | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov=./ --cov-report=xml --verbose redditdownloader/tests/ | ||
- name: Upload coverage to Codecov | ||
run: | | ||
pip install codecov | ||
codecov -t ${{secrets.CODECOV_TOKEN}} --name "${{ matrix.os }}, ${{ matrix.python-version }}" |
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,18 +1,9 @@ | ||
FROM python:3.7-slim | ||
|
||
WORKDIR ./rmd/ | ||
|
||
ADD redditdownloader/classes ./classes | ||
ADD redditdownloader/tests ./tests | ||
ADD redditdownloader/web ./web | ||
ADD docs ./docs | ||
ADD main.py ./ | ||
ADD requirements.txt ./ | ||
|
||
|
||
ADD redditdownloader ./redditdownloader | ||
|
||
RUN mkdir ./settings/ | ||
|
||
RUN pip install -r ./requirements.txt | ||
RUN pip install -r ./redditdownloader/requirements.txt | ||
|
||
ENTRYPOINT [ "python", "-u", "./main.py", "--settings", "./settings/settings.json"] | ||
ENTRYPOINT [ "python", "-u", "./redditdownloader/main.py", "--settings", "./settings/settings.json"] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
This file was deleted.
Oops, something went wrong.