Skip to content

Commit

Permalink
added github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 29, 2023
1 parent 217c019 commit 50a1395
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 52 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/coding-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Coding Style

on: [push, pull_request]

jobs:
nette_cc:
name: Nette Code Checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none

- run: composer create-project nette/code-checker temp/code-checker ^3 --no-progress
- run: php temp/code-checker/code-checker --strict-types --no-progress


nette_cs:
name: Nette Coding Standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none

- run: composer create-project nette/coding-standard temp/coding-standard ^3 --no-progress
- run: php temp/coding-standard/ecs check
21 changes: 21 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Static Analysis (only informative)

on:
push:
branches:
- master

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none

- run: composer install --no-progress --prefer-dist
- run: composer phpstan -- --no-progress
continue-on-error: true # is only informative
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests

on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.0', '8.1', '8.2', '8.3']

fail-fast: false

name: PHP ${{ matrix.php }} tests
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- run: composer install --no-progress --prefer-dist
- run: vendor/bin/tester tests -s -C
- if: failure()
uses: actions/upload-artifact@v3
with:
name: output
path: tests/**/output
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FTP Deployment: smart upload
============================

[![Downloads this Month](https://img.shields.io/packagist/dm/dg/ftp-deployment.svg)](https://packagist.org/packages/dg/ftp-deployment)
[![Tests](https://github.com/dg/ftp-deployment/workflows/Tests/badge.svg?branch=master)](https://github.com/dg/ftp-deployment/actions)
[![Tests](https://github.com/dg/ftp-deployment/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/dg/ftp-deployment/actions/workflows/tests.yml)
[![Latest Stable Version](https://poser.pugx.org/dg/ftp-deployment/v/stable)](https://github.com/dg/ftp-deployment/releases)
[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/dg/ftp-deployment/blob/master/license.md)

Expand Down

0 comments on commit 50a1395

Please sign in to comment.