Skip to content

Commit

Permalink
ci: add workflows for automatic (semantic) releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Strobotti committed Apr 29, 2024
1 parent 4f3309a commit d027b8f
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 19 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:

name: CI

jobs:
dependency-validation:
name: Dependency Validation

runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: "${{ runner.os }}-${{ hashFiles('**/composer.lock') }}"

- name: Install Composer
uses: php-actions/composer@v6

- name: Ensure that composer.json is valid
run: composer validate --no-ansi --strict composer.json

- name: Ensure that dependencies can be installed
run: composer install --no-ansi --dry-run


unit-tests:
name: Unit Tests
runs-on: ubuntu-latest

needs:
- dependency-validation

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: "${{ runner.os }}-${{ hashFiles('**/composer.lock') }}"

- name: Install Composer
uses: php-actions/composer@v6

- name: Run PHPUnit
run: vendor/bin/phpunit
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
branches:
- master

name: Release

jobs:
release:
name: Release

runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: paulhatch/semantic-version@latest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.DS_Store
.phpunit.result.cache
composer.lock
composer.phar
vendor
coverage.xml
clover.xml
Expand Down
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# php-jwk

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

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

0 comments on commit d027b8f

Please sign in to comment.