Skip to content

Commit 37fd85b

Browse files
authored
ci: add workflows for automatic (semantic) releases (#12)
1 parent 4f3309a commit 37fd85b

File tree

5 files changed

+76
-19
lines changed

5 files changed

+76
-19
lines changed

.github/workflows/ci.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
push:
3+
4+
name: CI
5+
6+
jobs:
7+
dependency-validation:
8+
name: Dependency Validation
9+
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 5
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Cache Composer dependencies
18+
uses: actions/cache@v3
19+
with:
20+
path: /tmp/composer-cache
21+
key: "${{ runner.os }}-${{ hashFiles('**/composer.lock') }}"
22+
23+
- name: Install Composer
24+
uses: php-actions/composer@v6
25+
26+
- name: Ensure that composer.json is valid
27+
run: composer validate --no-ansi --strict composer.json
28+
29+
- name: Ensure that dependencies can be installed
30+
run: composer install --no-ansi --dry-run
31+
32+
33+
unit-tests:
34+
name: Unit Tests
35+
runs-on: ubuntu-latest
36+
37+
needs:
38+
- dependency-validation
39+
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
44+
- name: Cache Composer dependencies
45+
uses: actions/cache@v3
46+
with:
47+
path: /tmp/composer-cache
48+
key: "${{ runner.os }}-${{ hashFiles('**/composer.lock') }}"
49+
50+
- name: Install Composer
51+
uses: php-actions/composer@v6
52+
53+
- name: Run PHPUnit
54+
run: vendor/bin/phpunit

.github/workflows/release.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
name: Release
7+
8+
jobs:
9+
release:
10+
name: Release
11+
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- uses: paulhatch/semantic-version@latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.DS_Store
33
.phpunit.result.cache
44
composer.lock
5+
composer.phar
56
vendor
67
coverage.xml
78
clover.xml

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# php-jwk
22

33
[![Latest Stable Version](https://poser.pugx.org/strobotti/php-jwk/v/stable)](https://packagist.org/packages/strobotti/php-jwk)
4-
[![codecov](https://codecov.io/gh/Strobotti/php-jwk/branch/master/graph/badge.svg)](https://codecov.io/gh/Strobotti/php-jwk)
5-
[![Build Status](https://travis-ci.com/Strobotti/php-jwk.svg?branch=master)](https://travis-ci.com/Strobotti/php-jwk)
64
[![License](https://poser.pugx.org/strobotti/php-jwk/license)](https://packagist.org/packages/strobotti/php-jwk)
75

86
A small PHP library to handle JWKs (Json Web Keys)

0 commit comments

Comments
 (0)