Merge pull request #141 from Orange-OpenSource/feature/add-tests-artifact

Add tests artifact
This commit is contained in:
Fabrice Reix 2021-02-04 13:24:22 +01:00 committed by GitHub
commit d4c734de60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 8 deletions

View File

@ -61,7 +61,7 @@ jobs:
cargo build --verbose
- name: Test Prequisites
run: |
pip3 install Flask && cd integration && python3 server.py &
pip3 install Flask && cd integration && python3 server.py >server.log 2>&1 &
wget https://snapshots.mitmproxy.org/5.2/mitmproxy-5.2-linux.tar.gz -O - | tar -xz && ./mitmdump -p 8888 --modify-header "/From-Proxy/Hello" &
- name: Run Tests
run: |
@ -69,7 +69,14 @@ jobs:
- name: Run Integration Tests
run: |
export PATH="$PWD/target/debug:$PATH"
integration/integration.py
cd integration
./integration.py
- name: Archive production artifacts
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: tests-ubuntu-${{ matrix.rust }}-artifacts
path: integration/server.log
test-osx:
runs-on: macos-latest
@ -94,7 +101,7 @@ jobs:
cargo build --verbose
- name: Test Prequisites
run: |
pip3 install Flask && cd integration && python3 server.py &
pip3 install Flask && cd integration && python3 server.py >server.log 2>&1 &
wget https://snapshots.mitmproxy.org/5.2/mitmproxy-5.2-osx.tar.gz -O - | tar -xz && ./mitmdump -p 8888 --modify-header "/From-Proxy/Hello" &
- name: Run Tests
run: |
@ -102,4 +109,11 @@ jobs:
- name: Run Integration Tests
run: |
export PATH="$PWD/target/debug:$PATH"
integration/integration.py
cd integration
./integration.py
- name: Archive production artifacts
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: tests-osx-${{ matrix.rust }}-artifacts
path: integration/server.log

View File

@ -1 +1 @@
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookie_file</span></span></div></div><span class="line"></span></div>
<div class="hurl-file"><div class="hurl-entry"><div class="request"><span class="line"><span class="comment"># curl --cookie tests/cookie_file.cookies http://localhost:8000/cookie_file</span></span><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/cookie_file</span></span></div><div class="response"><span class="line"><span class="version">HTTP/*</span> <span class="status">200</span></span></div></div></div>

View File

@ -1,2 +1,3 @@
# curl --cookie tests/cookie_file.cookies http://localhost:8000/cookie_file
GET http://localhost:8000/cookie_file
HTTP/* 200

View File

@ -1 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/cookie_file"}}]}
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/cookie_file"},"response":{"status":200}}]}

View File

@ -1 +1 @@
--cookie cookie_file.cookies
--cookie tests/cookie_file.cookies