mirror of
https://github.com/httpie/cli.git
synced 2024-11-24 16:53:35 +01:00
Split the monolithic workflow into specific ones (#1149)
* Split the monolithic workflow into specific ones * Rename workflows, improve commands * Update pip from the venv * Fix Windows setup * Lowercase macos-latest * Fix Windows run, again
This commit is contained in:
parent
4d7d6b66cf
commit
4c8633c6e5
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@ -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
|
|
21
.github/workflows/code-style.yml
vendored
Normal file
21
.github/workflows/code-style.yml
vendored
Normal file
@ -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
|
24
.github/workflows/coverage.yml
vendored
Normal file
24
.github/workflows/coverage.yml
vendored
Normal file
@ -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
|
@ -3,6 +3,7 @@ name: Check Brew Formula
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
|
- .github/workflows/packaging-mac-check-formula.yml
|
||||||
- extras/httpie.rb
|
- extras/httpie.rb
|
||||||
|
|
||||||
jobs:
|
jobs:
|
40
.github/workflows/tests.yml
vendored
Normal file
40
.github/workflows/tests.yml
vendored
Normal file
@ -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
|
3
Makefile
3
Makefile
@ -26,6 +26,9 @@ all: uninstall-httpie install test
|
|||||||
|
|
||||||
|
|
||||||
install: venv
|
install: venv
|
||||||
|
@echo $(H1)Updating package tools$(H1END)
|
||||||
|
$(VENV_PIP) install --upgrade pip wheel
|
||||||
|
|
||||||
@echo $(H1)Installing dev requirements$(H1END)
|
@echo $(H1)Installing dev requirements$(H1END)
|
||||||
$(VENV_PIP) install --upgrade --editable '.[dev]'
|
$(VENV_PIP) install --upgrade --editable '.[dev]'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user