blob: dffd0459612eda1d13db7ca6bb9f232810d4264c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
name: Test requests-cache with GitHub Actions
on:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
# Persist the SQLite file created by requests-cache across workflow runs
- id: cache
uses: actions/cache@v3
with:
path: example_cache.sqlite
key: none
# Install and run basic requests-cache example
- run: pip install '.'
- run: python examples/basic_sessions.py
- run: python examples/basic_sessions.py
- run: test -f example_cache.sqlite && echo 'Cache file created' || echo 'Cache file missing'
|