Skip to content

Commit

Permalink
Fix devcontainer and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
oanhnn committed Aug 29, 2022
1 parent d59f6fc commit a46024f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ RUN mkdir -p ${WORKSPACE} \
USER ${USERNAME}
WORKDIR ${WORKSPACE}

# RUN export PATH=/home/vscode/.local/bin:$$PATH
# RUN pip install black flake8 pytest

# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
# install local module
pip install .
# test with Pytest
pytest
6 changes: 4 additions & 2 deletions scripts/install-deps.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

python -m pip install --upgrade pip
pip install black build flake8 pytest
set -eux

pip install black flake8 pytest

if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
2 changes: 2 additions & 0 deletions scripts/lint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eux

# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

Expand Down
4 changes: 4 additions & 0 deletions scripts/test.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/bash

set -eux

pip install -e .

pytest

0 comments on commit a46024f

Please sign in to comment.