diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml new file mode 100644 index 00000000..e29dcaff --- /dev/null +++ b/.github/workflows/test-suite.yml @@ -0,0 +1,29 @@ +--- +name: Test Suite + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + tests: + name: "Python ${{ matrix.python-version }}" + runs-on: "ubuntu-latest" + + strategy: + matrix: + python-version: ["3.6", "3.7", "3.8"] + + steps: + - uses: "actions/checkout@v2" + - uses: "actions/setup-python@v1" + with: + python-version: "${{ matrix.python-version }}" + - name: "Install dependencies" + run: "scripts/install" + - name: "Run linting checks" + run: "scripts/check" + - name: "Run tests" + run: "scripts/test" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9b0efbca..00000000 --- a/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -dist: xenial -language: python - -cache: pip - -branches: - only: - - master - -python: - - 3.6 - - 3.7 - - 3.8 - -stages: - - check - - docs - - test - -matrix: - include: - - - stage: check - python: 3.7 - script: scripts/check - - stage: docs - python: 3.7 - script: scripts/docs-build - - stage: test - os: windows - language: shell - python: 3.7 - env: - PATH=/c/Python37:/c/Python37/Scripts:$PATH - before_install: - - choco install python --version 3.7 - - python -m pip install --upgrade pip - install: pip install -r requirements.txt - script: scripts/test - - fast_finish: true - allow_failures: - # FIX - # Some tests not yet resolved for Windows. (In progress) - - os: windows - -script: scripts/test - -after_script: - - if [ -f .coverage ]; then - python -m pip install codecov; - codecov --required; - fi diff --git a/README.md b/README.md index 0693a5a8..7dffacf8 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@
HTTPX - A next-generation HTTP client for Python.
-
-
-
-
+
+
diff --git a/codecov.yml b/codecov.yml
deleted file mode 100644
index 3920f5c1..00000000
--- a/codecov.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-coverage:
- status:
- patch:
- default:
- target: '100'
- project:
- default:
- target: '100'
diff --git a/docs/index.md b/docs/index.md
index 0f931171..401c7a15 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -10,11 +10,8 @@ HTTPX
-
-
-
+
+
diff --git a/scripts/install b/scripts/install
index 7e6a38f2..65885a72 100755
--- a/scripts/install
+++ b/scripts/install
@@ -1,15 +1,19 @@
#!/bin/sh -e
-export PREFIX="venv/bin/"
+# Use the Python executable provided from the `-p` option, or a default.
+[ "$1" = "-p" ] && PYTHON=$2 || PYTHON="python3"
+
+REQUIREMENTS="requirements.txt"
+VENV="venv"
set -x
-python -m venv venv
-${PREFIX}python -m pip install -U pip
-${PREFIX}python -m pip install -r requirements.txt
+if [ -z "$GITHUB_ACTIONS" ]; then
+ "$PYTHON" -m venv "$VENV"
+ PIP="$VENV/bin/pip"
+else
+ PIP="pip"
+fi
-set +x
-
-echo
-echo "Success! You can now activate your virtual environment using:"
-echo "source ${PREFIX}activate"
+"$PIP" install -r "$REQUIREMENTS"
+"$PIP" install -e .
diff --git a/scripts/test b/scripts/test
index 6f781f7b..6a4a752f 100755
--- a/scripts/test
+++ b/scripts/test
@@ -7,7 +7,7 @@ fi
set -x
-if [ -z $CI ]; then
+if [ -z $GITHUB_ACTIONS ]; then
scripts/check
fi