Skip to content

Misc fixes

Misc fixes #495

name: Test Code Samples
on:
pull_request:
schedule:
- cron: '0 0 * * *'
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
name: Run Code Samples
timeout-minutes: 30
strategy:
max-parallel: 2
matrix:
python-version:
- "3.7"
- "3.12"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-samples-${{ hashFiles('**/setup.cfg') }}
restore-keys: |
${{ runner.os }}-samples-
- name: Install dependencies
run: |
python -m pip install pip
pip install -e .
- name: Tests code samples
uses: actions/checkout@v3
with:
timeout_minutes: 25
max_attempts: 2
run: |
./tests/test_code_samples.sh ${{ secrets.MINDEE_ACCOUNT_SE_TESTS }} ${{ secrets.MINDEE_ENDPOINT_SE_TESTS }} ${{ secrets.MINDEE_API_KEY_SE_TESTS }}