Skip to content

Commit f2f9620

Browse files
authored
Merge pull request #5 from proxymesh/ci/proxy-integration-github-actions
CI: proxy integration tests on pull requests
2 parents 2c8c722 + cb97f32 commit f2f9620

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Integration tests against a real proxy (PROXY_URL). Add repository secret PROXY_URL
2+
# under Settings → Secrets and variables → Actions, then mark this workflow as a required
3+
# status check under branch protection (pull_request events only receive secrets for PRs
4+
# from the same repository, not from forks).
5+
6+
name: Proxy integration tests
7+
8+
on:
9+
pull_request:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
integration:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
with:
21+
persist-credentials: false
22+
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@2e007403fc1ec238429ecaa57af6f22f019cc135 # v1.234.0
25+
with:
26+
bundler-cache: true
27+
ruby-version: ruby
28+
29+
- name: Require PROXY_URL Actions secret
30+
env:
31+
PROXY_URL: ${{ secrets.PROXY_URL }}
32+
run: |
33+
if [ -z "${PROXY_URL}" ]; then
34+
echo "::error::PROXY_URL is not set. Add a repository (or environment) secret named PROXY_URL under Settings → Secrets and variables → Actions."
35+
exit 1
36+
fi
37+
38+
- name: Run integration tests
39+
env:
40+
PROXY_URL: ${{ secrets.PROXY_URL }}
41+
run: bundle exec ruby test/test_proxy_headers.rb

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[![Gem Version](https://badge.fury.io/rb/ruby-proxy-headers.svg)](https://badge.fury.io/rb/ruby-proxy-headers)
12
# Ruby Proxy Headers
23

34
Send and receive custom proxy headers during HTTPS `CONNECT` tunneling in modern Ruby HTTP workflows (for example [ProxyMesh](https://proxymesh.com) `X-ProxyMesh-IP` / `X-ProxyMesh-Country`).

0 commit comments

Comments
 (0)