-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·85 lines (78 loc) · 2.19 KB
/
Copy pathmain.yml
File metadata and controls
executable file
·85 lines (78 loc) · 2.19 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types:
- created
jobs:
test-and-coverage:
runs-on: ubuntu-latest
services:
authup:
image: ghcr.io/authup/authup:latest
env:
ROBOT_ENABLED: true
ROBOT_SECRET: start123
ports:
- "3000:3000"
steps:
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: "poetry"
- name: Install dependencies
run: poetry install --no-interaction --no-root --with=dev --all-extras
- name: Run tests
env:
AUTHUP_URL: http://localhost:3000
AUTHUP_USERNAME: admin
AUTHUP_PASSWORD: start123
AUTHUP_ROBOT_SECRET: start123
run: |
poetry run coverage run -m pytest
poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
test-versions:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
services:
authup:
image: ghcr.io/authup/authup:latest
env:
ROBOT_SECRET: start123
NODE_ENV: test
PUBLIC_URL: http://authup:3000/
ROBOT_ENABLED: true
ports:
- "3000:3000"
steps:
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Setup python version ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: poetry install --no-interaction --no-root --with=dev --all-extras
- name: Test with tox
env:
AUTHUP_URL: http://localhost:3000
AUTHUP_USERNAME: admin
AUTHUP_PASSWORD: start123
AUTHUP_ROBOT_SECRET: start123
run: poetry run tox