Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 84dd9bb

Browse files
Add CI
1 parent ff43917 commit 84dd9bb

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

‎.github/workflows/coding-standards.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "coding standards"
2+
3+
on: ["pull_request", "push"]
4+
5+
jobs:
6+
coding-standards:
7+
name: "coding standards"
8+
runs-on: "ubuntu-latest"
9+
steps:
10+
- name: "checkout"
11+
uses: "actions/checkout@v2"
12+
13+
- name: "installing PHP"
14+
uses: "shivammathur/setup-php@v2"
15+
with:
16+
php-version: "8.0"
17+
ini-values: memory_limit=-1
18+
tools: composer:v2, cs2pr, php-cs-fixer
19+
20+
- name: "checking"
21+
run: "php-cs-fixer fix --dry-run --diff --ansi"

‎.github/workflows/unit-tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "unit tests"
2+
3+
on: ["pull_request", "push"]
4+
5+
jobs:
6+
unit-tests:
7+
name: "unit tests"
8+
runs-on: "ubuntu-latest"
9+
strategy:
10+
matrix:
11+
php-version:
12+
- "8.0"
13+
steps:
14+
- name: "checkout"
15+
uses: "actions/checkout@v2"
16+
17+
- name: "installing PHP"
18+
uses: "shivammathur/setup-php@v2"
19+
with:
20+
php-version: "${{ matrix.php-version }}"
21+
tools: composer:v2, cs2pr
22+
coverage: pcov
23+
ini-values: memory_limit=-1
24+
25+
- name: "get composer cache directory"
26+
id: composer-cache
27+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
28+
29+
- name: "cache dependencies"
30+
uses: actions/cache@v2
31+
with:
32+
path: ${{ steps.composer-cache.outputs.dir }}
33+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
34+
restore-keys: ${{ runner.os }}-composer-
35+
36+
- name: "install dependencies"
37+
run: composer install --prefer-dist
38+
39+
- name: "running unit tests"
40+
run: vendor/bin/phpunit
41+
42+
- name: "upload coverage results to Codecov"
43+
uses: codecov/codecov-action@v1
44+
with:
45+
name: "phpunit-php${{ matrix.php-version }}"
46+
flags: phpunit
47+
fail_ci_if_error: true
48+
continue-on-error: true

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /