diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 25fd07f3..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Build -on: [push, pull_request] -jobs: - extras: - # Run coverage and extra tests only once - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - run: python -m pip install --upgrade pip setuptools wheel - - run: make install - - run: make codestyle - - run: make test-cover - - run: make codecov-upload - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_REPO_TOKEN }} - - run: make test-dist - test: - # Run core HTTPie tests everywhere - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - python-version: [3.6, 3.7, 3.8, 3.9, "3.10.0-rc.1"] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - run: python -m pip install --upgrade pip setuptools wheel - - run: python -m pip install --upgrade '.[dev]' - - run: python -m pytest --verbose ./httpie ./tests diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 00000000..d006c85d --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,21 @@ +name: Code style + +on: + pull_request: + paths: + - .github/workflows/code-style.yml + - extras/*.py + - httpie/**/*.py + - setup.py + - tests/**/*.py + +jobs: + code-style: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - run: make venv + - run: make codestyle diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..8c0f94f0 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,24 @@ +name: Coverage + +on: + pull_request: + paths: + - .github/workflows/coverage.yml + - httpie/**/*.py + - setup.* + - tests/**/*.py + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + - run: make install + - run: make test-cover + - run: make codecov-upload + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_REPO_TOKEN }} + - run: make test-dist diff --git a/.github/workflows/packaging_mac_check_formula.yml b/.github/workflows/packaging-mac-check-formula.yml similarity index 85% rename from .github/workflows/packaging_mac_check_formula.yml rename to .github/workflows/packaging-mac-check-formula.yml index c3f69a0f..f1c72f59 100644 --- a/.github/workflows/packaging_mac_check_formula.yml +++ b/.github/workflows/packaging-mac-check-formula.yml @@ -3,6 +3,7 @@ name: Check Brew Formula on: pull_request: paths: + - .github/workflows/packaging-mac-check-formula.yml - extras/httpie.rb jobs: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..ae532223 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,40 @@ +name: Tests + +on: + push: + branches: + - master + paths: + - httpie/**/*.py + - setup.* + pull_request: + paths: + - .github/workflows/tests.yml + - httpie/**/*.py + - setup.* + - tests/**/*.py + +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10.0-rc.2"] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Windows setup + if: matrix.os == 'windows-latest' + run: | + python -m pip install --upgrade pip wheel + python -m pip install --upgrade '.[dev]' + python -m pytest --verbose ./httpie ./tests + - name: Linux & Mac setup + if: matrix.os != 'windows-latest' + run: | + make install + make test diff --git a/.github/workflows/update_documentation.yml b/.github/workflows/update-documentation.yml similarity index 100% rename from .github/workflows/update_documentation.yml rename to .github/workflows/update-documentation.yml diff --git a/Makefile b/Makefile index 52b5a8b4..a020d659 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,9 @@ all: uninstall-httpie install test install: venv + @echo $(H1)Updating package tools$(H1END) + $(VENV_PIP) install --upgrade pip wheel + @echo $(H1)Installing dev requirements$(H1END) $(VENV_PIP) install --upgrade --editable '.[dev]'