forked from tuupola/slim-jwt-auth
-
Notifications
You must be signed in to change notification settings - Fork 3
89 lines (81 loc) · 2.08 KB
/
tests.yml
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
86
87
88
name: Tests
on:
push:
branches:
- main
- 2.x
pull_request:
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ["8.1", "8.2", "8.3"]
dependency-versions: ["highest"]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependency-versions }}
- name: Run linter
run: make lint
- name: Run unit tests
run: make unit
- name: Run static analysis
run: make static
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: jimtools/jwt-auth
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PIP Dependencies
uses: actions/setup-python@v5
with:
cache: 'pip'
- run: python -m pip install -r ./docs/requirements.txt
- name: Build Docs
run: |
git fetch --tags
cd docs
mkdir _build
python build_docs.py
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './pages'
deploy:
needs: docs
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}