Skip to content

Commit

Permalink
ci: run integration tests daily
Browse files Browse the repository at this point in the history
  • Loading branch information
JaZo committed Mar 12, 2024
1 parent f000175 commit 8763324
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run integration tests

on:
schedule:
- cron: '30 5 * * *'

jobs:
php-tests:
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-8.1-composer-prefer-stable-${{ hashFiles('**/composer.json') }}
restore-keys: php-8.1-composer-prefer-stable-

- name: Install dependencies
env:
MELVIN_USERNAME: ${{ secrets.MELVIN_USERNAME }}
MELVIN_PASSWORD: ${{ secrets.MELVIN_PASSWORD }}
run: composer update --prefer-stable --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/phpunit --testsuite=integration
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Buy us a tree][ico-treeware]][link-treeware]
[![Build Status][ico-github-actions]][link-github-actions]
[![Build Status][ico-tests]][link-tests]
[![Integration Tests Status][ico-integration-tests]][link-integration-tests]
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
[![Quality Score][ico-code-quality]][link-code-quality]
[![Total Downloads][ico-downloads]][link-downloads]
Expand Down Expand Up @@ -83,14 +84,16 @@ This package is [Treeware](https://treeware.earth). If you use it in production,
[ico-version]: https://img.shields.io/packagist/v/swisnl/melvin.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-treeware]: https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen.svg?style=flat-square
[ico-github-actions]: https://img.shields.io/github/actions/workflow/status/swisnl/melvin/tests.yml?label=tests&branch=master&style=flat-square
[ico-tests]: https://img.shields.io/github/actions/workflow/status/swisnl/melvin/tests.yml?label=tests&branch=master&style=flat-square
[ico-integration-tests]: https://img.shields.io/github/actions/workflow/status/swisnl/melvin/integration-tests.yml?label=integration%20tests&branch=master&style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/swisnl/melvin.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/swisnl/melvin.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/swisnl/melvin.svg?style=flat-square
[ico-swis]: https://img.shields.io/badge/%F0%9F%9A%80-made%20by%20SWIS-%230737A9.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/swisnl/melvin
[link-github-actions]: https://github.com/swisnl/melvin/actions/workflows/tests.yml
[link-tests]: https://github.com/swisnl/melvin/actions/workflows/tests.yml
[link-integration-tests]: https://github.com/swisnl/melvin/actions/workflows/integration-tests.yml
[link-scrutinizer]: https://scrutinizer-ci.com/g/swisnl/melvin/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/swisnl/melvin
[link-downloads]: https://packagist.org/packages/swisnl/melvin
Expand Down

0 comments on commit 8763324

Please sign in to comment.