Skip to content

Commit 1fbc0c4

Browse files
committed
:octocat: CI update
1 parent f5a3987 commit 1fbc0c4

File tree

1 file changed

+40
-14
lines changed

1 file changed

+40
-14
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml
33

44
on:
5-
- pull_request
6-
- push
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
711

812
name: "CI"
913

@@ -20,7 +24,7 @@ jobs:
2024

2125
steps:
2226
- name: "Checkout"
23-
uses: actions/checkout@v2
27+
uses: actions/checkout@v3
2428

2529
- name: "Install PHP"
2630
uses: shivammathur/setup-php@v2
@@ -31,11 +35,38 @@ jobs:
3135
extensions: ast, curl, json, simplexml, zlib
3236

3337
- name: "Update dependencies with composer"
34-
run: composer update --no-interaction --no-ansi --no-progress --no-suggest
38+
run: composer update --no-interaction --no-ansi --no-progress
3539

3640
- name: "Run phan"
3741
run: php vendor/bin/phan
3842

43+
build-docs:
44+
name: "Build and publish Docs"
45+
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- name: "Checkout sources"
50+
uses: actions/checkout@v3
51+
52+
- name: "Install PHP"
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: "7.4"
56+
coverage: none
57+
tools: phpDocumentor
58+
extensions: gd, imagick, json, mbstring
59+
60+
- name: "Build Docs"
61+
run: phpdoc --config=phpdoc.xml
62+
63+
- name: "Publish Docs to gh-pages"
64+
uses: JamesIves/github-pages-deploy-action@v4
65+
with:
66+
BRANCH: gh-pages
67+
FOLDER: docs
68+
CLEAN: true
69+
3970
tests:
4071
name: "Unit Tests"
4172

@@ -50,15 +81,12 @@ jobs:
5081
php-version:
5182
- "7.4"
5283
- "8.0"
53-
# - "8.1"
84+
- "8.1"
85+
- "8.2"
5486

5587
steps:
56-
- name: "Configure git to avoid issues with line endings"
57-
if: ${{ runner.os == 'Windows' }}
58-
run: git config --global core.autocrlf false
59-
6088
- name: "Checkout"
61-
uses: actions/checkout@v2
89+
uses: actions/checkout@v3
6290

6391
- name: "Fetch cacert.pem from curl.haxx.se"
6492
run: curl -o tests/cacert.pem https://curl.haxx.se/ca/cacert.pem
@@ -71,12 +99,10 @@ jobs:
7199
extensions: curl, json, simplexml, zlib
72100

73101
- name: "Install dependencies with composer"
74-
run: composer update --no-ansi --no-interaction --no-progress --no-suggest
102+
run: composer update --no-ansi --no-interaction --no-progress
75103

76104
- name: "Run tests with phpunit"
77105
run: php vendor/phpunit/phpunit/phpunit --configuration=phpunit.xml.dist
78106

79107
- name: "Send code coverage report to Codecov.io"
80-
uses: codecov/codecov-action@v1
81-
with:
82-
token: ${{ secrets.CODECOV_TOKEN }}
108+
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)