Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added working tests and running tests workflow #18

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run Pre-recorded Tests

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
run-tests:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
pip install vcrpy pytest==7.4.2 requests pytest-mock python-documentcloud pytest-xdist pytest-recording

- name: Run pre-recorded tests
run: |
make test
working-directory: .
18 changes: 8 additions & 10 deletions tests/cassettes/fixtures/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interactions:
uri: https://dev.squarelet.com/api/token/
response:
body:
string: '{"refresh":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTY5ODg1MTU0MCwianRpIjoiYTM4OWNhNDk5Njk1NDAyZWE4YTZkMDVkZDU5ZmI0ZjIiLCJ1c2VyX2lkIjoiOWE3MzJmNGItMDU0Zi00ZDQ0LWFiYjAtZDg0MjE3ZGNhMzMzIiwiYXVkIjpbInNxdWFyZWxldCIsIm11Y2tyb2NrIiwiZG9jdW1lbnRjbG91ZCJdLCJpc3MiOlsic3F1YXJlbGV0Il19.Vq8E0HaO9182KL2bdzyYJ5B5t0B_oT7tCT4zCDDrXlQ1S29IIn6NU2hr9rb4UsxlFIG4OdWCJ3pOd8HCpyUE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RIK237xb8I-639JFZEg7fQKlAZ0CsC1TXx-oI2syiHXsqA-W1NDLDtN8ayvuzYgqTrS0GrBXbdGFEREwDF1u0A"}'
headers:
Allow:
- POST, OPTIONS
Expand All @@ -28,21 +28,19 @@ interactions:
- '1313'
Content-Type:
- application/json
Cross-Origin-Opener-Policy:
- same-origin
Date:
- Tue, 31 Oct 2023 15:12:20 GMT
- Fri, 03 Nov 2023 19:37:54 GMT
Referrer-Policy:
- same-origin
Server:
- nginx/1.25.2
- nginx/1.23.1
Server-Timing:
- TimerPanel_utime;dur=75.67999999999131;desc="User CPU time", TimerPanel_stime;dur=22.729999999995698;desc="System
CPU time", TimerPanel_total;dur=98.40999999998701;desc="Total CPU time", TimerPanel_total_time;dur=64.31365013122559;desc="Elapsed
time", SQLPanel_sql_time;dur=3.7102699279785156;desc="SQL 3 queries", CachePanel_total_time;dur=0;desc="Cache
0 Calls"
- TimerPanel_utime;dur=299.0890000000004;desc="User CPU time", TimerPanel_stime;dur=28.29700000000024;desc="System
CPU time", TimerPanel_total;dur=327.38600000000065;desc="Total CPU time",
TimerPanel_total_time;dur=127.46310234069824;desc="Elapsed time", SQLPanel_sql_time;dur=9.727001190185547;desc="SQL
3 queries", CachePanel_total_time;dur=0;desc="Cache 0 Calls"
Set-Cookie:
- op_browser_state=a693ff4d740f6797bfa768e6e8ac345fc63d2a9eb905e3b2a006d576;
- op_browser_state=a65d397bd2e066c643dd80ba21918e6b815229469d827ea8c5226471;
Path=/
Vary:
- Accept, Origin, Cookie
Expand Down
Loading
Loading