Skip to content

Commit

Permalink
Add CI (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
l-you committed Dec 12, 2023
1 parent 6a7efb3 commit 5cc5b0c
Show file tree
Hide file tree
Showing 3 changed files with 278 additions and 274 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
name: PHP Composer

on:
push:
branches: [ "main" ]
branches:
- '*'
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

test:
strategy:
matrix:
php: [ 8.2, 8.3]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
${{ runner.os }}-php-${{ matrix.php }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress
run: |
composer install --prefer-dist --no-progress
- name: Run test suite
run: composer run-script test
4 changes: 0 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
"RevoTale\\CheckboxUA\\": "src/"
}
},
"repository": {
"type": "git",
"url": "https://github.com/RevoTale/php-checkbox-ua.git"
},
"require": {
"php": "^8.2",
"jane-php/open-api-runtime": "^7.5",
Expand Down
Loading

0 comments on commit 5cc5b0c

Please sign in to comment.