Skip to content

Commit

Permalink
Merge branch 'develop' into maintenance/gha-concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh authored Nov 4, 2021
2 parents e2b71fb + 9fa14d7 commit d9ba58f
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 100 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
---
open_collective: proxypy
...
35 changes: 21 additions & 14 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
on: # yamllint disable-line rule:truthy
push:
branches: [develop, master]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
schedule:
- cron: '0 14 * * 1'
- cron: '0 14 * * 1'

jobs:
analyze:
Expand All @@ -23,10 +24,13 @@ jobs:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
# Supported options are
# ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['python', 'javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
# https://docs.github.com/en/github
# /finding-security-vulnerabilities-and-errors-in-your-code
# /configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
Expand All @@ -46,26 +50,29 @@ jobs:
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# If you wish to specify custom queries, you can do so here or in a
# config file. By default, queries listed here will override any
# specified in a config file. Prefix the list here with "+" to use
# these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# If this step fails, then you should remove it and run the build manually
# (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language

#- run: |
# make bootstrap
# make release
# - run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
...
26 changes: 14 additions & 12 deletions .github/workflows/test-brew.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Proxy.py Brew

on: [push, pull_request]
on: [push, pull_request] # yamllint disable-line rule:truthy

jobs:
build:
Expand All @@ -13,14 +14,15 @@ jobs:
max-parallel: 1
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Brew
run: |
brew install ./helper/homebrew/develop/proxy.rb
- name: Verify
run: |
proxy -h
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Brew
run: |
brew install ./helper/homebrew/develop/proxy.rb
- name: Verify
run: |
proxy -h
...
34 changes: 18 additions & 16 deletions .github/workflows/test-dashboard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Proxy.py Dashboard

on: [push, pull_request]
on: [push, pull_request] # yamllint disable-line rule:truthy

jobs:
build:
Expand All @@ -13,18 +14,19 @@ jobs:
max-parallel: 4
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: |
cd dashboard
npm install
cd ..
- name: Build Dashboard
run: |
cd dashboard
npm run build
cd ..
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: |
cd dashboard
npm install
cd ..
- name: Build Dashboard
run: |
cd dashboard
npm run build
cd ..
...
32 changes: 17 additions & 15 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Proxy.py Docker

on: [push, pull_request]
on: [push, pull_request] # yamllint disable-line rule:truthy

jobs:
build:
Expand All @@ -13,17 +14,18 @@ jobs:
max-parallel: 1
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-testing.txt
pip install -r requirements-tunnel.txt
- name: Build
run: |
make container
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-testing.txt
pip install -r requirements-tunnel.txt
- name: Build
run: |
make container
...
55 changes: 31 additions & 24 deletions .github/workflows/test-library.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Proxy.py Library

on: [push, pull_request]
on: [push, pull_request] # yamllint disable-line rule:truthy

concurrency:
group: >-
Expand All @@ -22,29 +23,34 @@ jobs:
max-parallel: 4
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-testing.txt
pip install -r requirements-tunnel.txt
- name: Run Tests
run: pytest --cov=proxy tests/
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: codecov
- name: Integration testing
if: matrix.os != 'windows'
run: |
pip install .
proxy --hostname 127.0.0.1 --enable-web-server --pid-file proxy.pid --log-file proxy.log &
./tests/integration/main.sh
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-testing.txt
pip install -r requirements-tunnel.txt
- name: Run Tests
run: pytest --cov=proxy tests/
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: codecov
- name: Integration testing
if: matrix.os != 'windows'
run: |
pip install .
proxy \
--hostname 127.0.0.1 \
--enable-web-server \
--pid-file proxy.pid \
--log-file proxy.log \
&
./tests/integration/main.sh
tox:
name: ${{ matrix.toxenv }}
Expand Down Expand Up @@ -135,3 +141,4 @@ jobs:
run: >-
print("All's good")
shell: python
...
18 changes: 1 addition & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ repos:
- id: check-byte-order-marker
- id: check-case-conflict
# disabled due to pre-commit/pre-commit-hooks#159
#- id: check-docstring-first
# - id: check-docstring-first
- id: check-json
- id: check-symlinks
- id: check-yaml
# args:
# - --unsafe
- id: detect-private-key

# Heavy checks:
Expand Down Expand Up @@ -141,20 +139,6 @@ repos:
rev: v1.26.2
hooks:
- id: yamllint
exclude: |
(?x)
^
\.pre-commit-config\.yaml|
(
\.github/(
workflows/(
codeql-analysis|test-(brew|dashboard|docker|library)
)|
FUNDING
)|
codecov
)\.yml
$
args:
- --strict
types: [file, yaml]
Expand Down
6 changes: 4 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
codecov:
require_ci_to_pass: yes
require_ci_to_pass: yes # yamllint disable-line rule:truthy
notify:
wait_for_ci: yes
wait_for_ci: yes # yamllint disable-line rule:truthy
coverage:
status:
project:
Expand All @@ -10,3 +11,4 @@ coverage:
patch:
default:
threshold: 1%
...

0 comments on commit d9ba58f

Please sign in to comment.