Skip to content

Commit 64c6184

Browse files
committed
Added nightly test and lint GitHub action
1 parent 7e3c146 commit 64c6184

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Daily Test and Lint
2+
3+
on:
4+
schedule:
5+
- cron: '*/10 * * * *' # Run every 10 minutes
6+
7+
jobs:
8+
test-and-lint:
9+
name: Test and lint package
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
cache: 'pip'
23+
cache-dependency-path: |
24+
**/requirements*.txt
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install .[test,tox_gh,tox,mypy,flake8]
30+
31+
# Linting step only runs for Python 3.8
32+
- name: mypy
33+
if: matrix.python-version == '3.8'
34+
continue-on-error: true
35+
run: mypy -p corbado_python_sdk --exclude generated --strict --disable-error-code attr-defined
36+
- name: lint with flake8
37+
if: matrix.python-version == '3.8'
38+
run: flake8 .
39+
40+
- name: Test with tox
41+
run: |
42+
tox run
43+
env:
44+
CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }}
45+
CORBADO_FRONTEND_API: ${{ vars.CORBADO_FRONTEND_API }}
46+
CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }}
47+
CORBADO_PROJECT_ID: ${{ secrets.CORBADO_PROJECT_ID }}

0 commit comments

Comments
 (0)