Skip to content

Commit bb3b183

Browse files
committed
minor #1171 Replace Travis and Appveyor by GitHub Actions (javiereguiluz)
This PR was squashed before being merged into the master branch. Discussion ---------- Replace Travis and Appveyor by GitHub Actions Commits ------- 4b59c62 Replace Travis and Appveyor by GitHub Actions
2 parents a947168 + 4b59c62 commit bb3b183

File tree

4 files changed

+156
-135
lines changed

4 files changed

+156
-135
lines changed

.github/workflows/ci.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "CI"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'master'
8+
9+
env:
10+
fail-fast: true
11+
PHPUNIT_FLAGS: "-v"
12+
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit"
13+
SYMFONY_REQUIRE: ">=4.4"
14+
15+
jobs:
16+
test:
17+
name: "${{ matrix.operating-system }} / PHP ${{ matrix.php-version }}"
18+
runs-on: ${{ matrix.operating-system }}
19+
continue-on-error: ${{ matrix.allow-failures }}
20+
21+
strategy:
22+
matrix:
23+
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
24+
php-version: ['7.2.9', '7.3', '7.4', '8.0']
25+
26+
steps:
27+
- name: "Checkout code"
28+
uses: actions/[email protected]
29+
30+
- name: "Install PHP with extensions"
31+
uses: shivammathur/[email protected]
32+
with:
33+
coverage: "none"
34+
extensions: "intl, mbstring, pdo_sqlite"
35+
php-version: ${{ matrix.php-version }}
36+
tools: composer:v2
37+
38+
- name: "Add PHPUnit matcher"
39+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
40+
41+
- name: "Set composer cache directory"
42+
id: composer-cache
43+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
44+
45+
- name: "Cache composer"
46+
uses: actions/[email protected]
47+
with:
48+
path: ${{ steps.composer-cache.outputs.dir }}
49+
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
50+
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
51+
52+
- name: "Require symfony/flex"
53+
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main
54+
55+
- if: matrix.php-version != '8.0'
56+
run: composer update
57+
58+
- if: matrix.php-version == '8.0'
59+
run: composer update --ignore-platform-reqs=php
60+
61+
- name: "Install PHPUnit"
62+
run: vendor/bin/simple-phpunit install
63+
64+
- name: "PHPUnit version"
65+
run: vendor/bin/simple-phpunit --version
66+
67+
- name: "Run tests"
68+
run: vendor/bin/simple-phpunit ${{ env.PHPUNIT_FLAGS }}

.github/workflows/lint.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: "Lint"
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
fail-fast: true
7+
8+
jobs:
9+
php-cs-fixer:
10+
name: PHP-CS-Fixer
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: "Checkout code"
14+
uses: actions/checkout@v2
15+
16+
- name: PHP-CS-Fixer
17+
uses: docker://oskarstark/php-cs-fixer-ga
18+
with:
19+
args: --diff --dry-run
20+
21+
linters:
22+
name: Linters
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
php-version: ['7.4']
27+
28+
steps:
29+
- name: "Checkout code"
30+
uses: actions/[email protected]
31+
32+
- name: "Install PHP with extensions"
33+
uses: shivammathur/[email protected]
34+
with:
35+
coverage: "none"
36+
extensions: intl
37+
php-version: ${{ matrix.php-version }}
38+
tools: composer:v2
39+
40+
- name: "Set composer cache directory"
41+
id: composer-cache
42+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
43+
44+
- name: "Cache composer"
45+
uses: actions/[email protected]
46+
with:
47+
path: ${{ steps.composer-cache.outputs.dir }}
48+
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
49+
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer-
50+
51+
- name: "Require symfony/flex"
52+
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main
53+
54+
- name: "Composer update"
55+
id: install
56+
run: composer update --no-scripts
57+
58+
- name: Lint YAML files
59+
if: always() && steps.install.outcome == 'success'
60+
run: ./bin/console lint:yaml config --parse-tags
61+
62+
- name: Lint Twig templates
63+
if: always() && steps.install.outcome == 'success'
64+
run: ./bin/console lint:twig templates --env=prod
65+
66+
- name: Lint XLIFF translations
67+
if: always() && steps.install.outcome == 'success'
68+
run: ./bin/console lint:xliff translations
69+
70+
- name: Lint Parameters and Services
71+
if: always() && steps.install.outcome == 'success'
72+
run: ./bin/console lint:container
73+
74+
- name: Lint Doctrine entities
75+
if: always() && steps.install.outcome == 'success'
76+
run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
77+
78+
- name: Lint Composer config
79+
if: always() && steps.install.outcome == 'success'
80+
run: composer validate --strict
81+
82+
- name: Download Symfony CLI
83+
if: always() && steps.install.outcome == 'success'
84+
run: wget https://get.symfony.com/cli/installer -O - | bash
85+
86+
- name: Check if any dependencies are compromised
87+
if: always() && steps.install.outcome == 'success'
88+
run: /home/runner/.symfony/bin/symfony check:security

.travis.yml

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

appveyor.yml

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

0 commit comments

Comments
 (0)