diff options
| author | Maximilian Hils <git@maximilianhils.com> | 2020-04-09 08:37:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-09 08:37:57 +0200 |
| commit | 0d9e517c064ca3992fac83c3a1ec6e4284221e72 (patch) | |
| tree | c1472652ee95cf8c41b91d544e89f3b0d64c0323 /.github/workflows | |
| parent | 4d6886a0f4ebbf6bc66b74fa548ff724ba2ad660 (diff) | |
| parent | b5e3f736c0c6654c3ef0d1f280a4eacdb5ca91de (diff) | |
| download | mitmproxy-0d9e517c064ca3992fac83c3a1ec6e4284221e72.tar.gz mitmproxy-0d9e517c064ca3992fac83c3a1ec6e4284221e72.tar.bz2 mitmproxy-0d9e517c064ca3992fac83c3a1ec6e4284221e72.zip | |
Merge pull request #3767 from mitmproxy/fix-ci
re-add missing CI steps and fix linting
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/main.yml | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59dad0ff..0d234358 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,10 +2,6 @@ name: CI on: [push, pull_request] -env: - # Codecov - CODECOV_TOKEN: "0409bdfd-57a4-477d-a8af-f6172ef431d3" - jobs: lint-pr: if: github.event_name == 'pull_request' @@ -14,21 +10,34 @@ jobs: - uses: actions/checkout@v1 - uses: TrueBrain/actions-flake8@v1.2 lint-local: - # do not use external action when secrets are exposed. if: github.event_name == 'push' runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 - - run: pip install flake8 - - run: flake8 mitmproxy pathod examples test release + - run: pip install tox + - run: tox -e flake8 + filename-matching: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + - run: pip install tox + - run: tox -e filename_matching mypy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 - - run: pip install mypy==0.770 - - run: mypy . + - run: pip install tox + - run: tox -e mypy + individual-coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + - run: pip install tox + - run: tox -e individual_coverage test: strategy: fail-fast: false @@ -43,19 +52,11 @@ jobs: python-version: '3.8' - run: pip install tox - run: tox -e py38 - # codecov's GitHub action only supports Linux. https://github.com/codecov/codecov-action/issues/7 - # codecov's Python uploader has no github actions support yet. https://github.com/codecov/codecov-python/pull/214 - - name: Extract branch name # https://stackoverflow.com/a/58035262/934719 - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - run: pip install codecov - - run: > - codecov -f coverage.xml - --name python-${{ matrix.os }} - --commit ${{ github.sha }} - --slug ${{ github.repository }} - --branch ${{ steps.extract_branch.outputs.branch }} + - uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + name: ${{ matrix.os }} + fail_ci_if_error: true test-py35: runs-on: ubuntu-latest steps: @@ -127,7 +128,11 @@ jobs: run: yarn - working-directory: ./web run: npm test - - run: bash <(curl -s https://codecov.io/bash) + - uses: codecov/codecov-action@v1 + with: + file: ./web/coverage/coverage-final.json + name: web + fail_ci_if_error: true docs: env: |
