Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
9794b55f
Unverified
Commit
9794b55f
authored
4 years ago
by
Tim van Dijen
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Migrate from Travis to Actions (#1416)
parent
879588a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.appveyor.yml
+0
-26
0 additions, 26 deletions
.appveyor.yml
.github/workflows/php.yml
+205
-0
205 additions, 0 deletions
.github/workflows/php.yml
.travis.yml
+0
-137
0 additions, 137 deletions
.travis.yml
with
205 additions
and
163 deletions
.appveyor.yml
deleted
100644 → 0
+
0
−
26
View file @
879588a5
build
:
false
shallow_clone
:
false
version
:
'
2.0.0.{build}'
platform
:
'
x64'
clone_folder
:
C:\projects\simplesamlphp
environment
:
matrix
:
-
PHP_VERSION
:
"
7.4"
install
:
-
ps
:
Invoke-WebRequest "https://raw.githubusercontent.com/ChadSikorra/ps-install-php/master/Install-PHP.ps1" -OutFile "Install-PHP.ps1"
-
ps
:
.\Install-PHP.ps1 -Version $Env:PHP_VERSION -Highest -Arch x64 -Extensions mbstring,intl,openssl,curl,pdo_mysql,pdo_sqlite
-
refreshenv
-
cd C:\projects\simplesamlphp
-
php -r "readfile('https://getcomposer.org/installer');" | php
before_test
:
-
cd C:\projects\simplesamlphp
# For 2.0 (or once the externalized modules are no longer included), remove the --ignore-platform-reqs
-
php composer.phar install --no-interaction --no-progress --optimize-autoloader --prefer-source --no-ansi --ignore-platform-reqs
test_script
:
-
cd C:\projects\simplesamlphp
-
vendor\bin\phpunit.bat
This diff is collapsed.
Click to expand it.
.github/workflows/php.yml
0 → 100644
+
205
−
0
View file @
9794b55f
name
:
CI
on
:
push
:
branches
:
[
'
**'
]
pull_request
:
branches
:
[
master
,
release-*
]
jobs
:
basic-tests
:
name
:
Syntax and unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}
runs-on
:
${{ matrix.operating-system }}
strategy
:
fail-fast
:
false
matrix
:
operating-system
:
[
ubuntu-latest
,
windows-latest
]
php-versions
:
[
'
7.4'
]
steps
:
-
name
:
Setup PHP, with composer and extensions
uses
:
shivammathur/setup-php@v2
#https://github.com/shivammathur/setup-php
with
:
php-version
:
${{ matrix.php-versions }}
extensions
:
mbstring, mysql, pdo, pdo_sqlite, xml
coverage
:
pcov
-
name
:
Setup problem matchers for PHP
run
:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
-
name
:
Setup problem matchers for PHPUnit
run
:
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
-
name
:
Set git to use LF
run
:
|
git config --global core.autocrlf false
git config --global core.eol lf
-
uses
:
actions/checkout@v2
-
name
:
Get composer cache directory
id
:
composer-cache
run
:
echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name
:
Cache composer dependencies
uses
:
actions/cache@v1
with
:
path
:
${{ steps.composer-cache.outputs.dir }}
key
:
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys
:
${{ runner.os }}-composer-
-
name
:
Validate composer.json and composer.lock
run
:
composer validate
-
name
:
Install Composer dependencies
run
:
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
-
name
:
Syntax check PHP
run
:
bash vendor/bin/check-syntax-php.sh
-
name
:
Decide whether to run code coverage or not
if
:
${{ matrix.php-versions != '7.4' || matrix.operating-system != 'ubuntu-latest' }}
run
:
|
echo "NO_COVERAGE=--no-coverage" >> $GITHUB_ENV
-
name
:
Run unit tests
run
:
|
echo $NO_COVERAGE
./vendor/bin/phpunit $NO_COVERAGE
-
name
:
Save coverage data
if
:
${{ matrix.php-versions == '7.4' && matrix.operating-system == 'ubuntu-latest' }}
uses
:
actions/upload-artifact@v1
with
:
name
:
build-data
path
:
${{ github.workspace }}/build
security
:
name
:
Security checks
runs-on
:
[
ubuntu-latest
]
steps
:
-
name
:
Setup PHP, with composer and extensions
uses
:
shivammathur/setup-php@v2
#https://github.com/shivammathur/setup-php
with
:
php-version
:
'
7.4'
extensions
:
mbstring, xml
coverage
:
none
-
name
:
Setup problem matchers for PHP
run
:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
-
uses
:
actions/checkout@v2
-
name
:
Get composer cache directory
id
:
composer-cache
run
:
echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name
:
Cache composer dependencies
uses
:
actions/cache@v1
with
:
path
:
${{ steps.composer-cache.outputs.dir }}
key
:
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys
:
${{ runner.os }}-composer-
-
name
:
Install Composer dependencies
run
:
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
-
name
:
Security check for locked dependencies
run
:
./vendor/bin/security-checker security:check
-
name
:
Update Composer dependencies
run
:
composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader
-
name
:
Security check for updated dependencies
run
:
./vendor/bin/security-checker security:check
sanity-check
:
name
:
Sanity checks
runs-on
:
[
ubuntu-latest
]
steps
:
-
name
:
Setup PHP, with composer and extensions
uses
:
shivammathur/setup-php@v2
#https://github.com/shivammathur/setup-php
with
:
php-version
:
'
7.4'
extensions
:
mbstring, xml
coverage
:
none
-
name
:
Setup problem matchers for PHP
run
:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
-
uses
:
actions/checkout@v2
-
name
:
Get composer cache directory
id
:
composer-cache
run
:
echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name
:
Cache composer dependencies
uses
:
actions/cache@v1
with
:
path
:
${{ steps.composer-cache.outputs.dir }}
key
:
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys
:
${{ runner.os }}-composer-
-
name
:
Install Composer dependencies
run
:
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
-
name
:
Install test framework
run
:
composer require simplesamlphp/simplesamlphp-test-framework --dev
-
name
:
Syntax check YAML / XML / JSON
run
:
|
bash vendor/bin/check-syntax-yaml.sh
bash vendor/bin/check-syntax-xml.sh
bash vendor/bin/check-syntax-json.sh
quality
:
name
:
Quality control
runs-on
:
[
ubuntu-latest
]
needs
:
[
basic-tests
]
steps
:
-
name
:
Setup PHP, with composer and extensions
uses
:
shivammathur/setup-php@v2
#https://github.com/shivammathur/setup-php
with
:
php-version
:
'
7.4'
extensions
:
mbstring, xml
-
name
:
Setup problem matchers for PHP
run
:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
-
uses
:
actions/checkout@v2
-
name
:
Get composer cache directory
id
:
composer-cache
run
:
echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name
:
Cache composer dependencies
uses
:
actions/cache@v1
with
:
path
:
${{ steps.composer-cache.outputs.dir }}
key
:
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys
:
${{ runner.os }}-composer-
-
name
:
Install Composer dependencies
run
:
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
-
uses
:
actions/download-artifact@v1
with
:
name
:
build-data
path
:
${{ github.workspace }}/build
-
name
:
Codecov
uses
:
codecov/codecov-action@v1
-
name
:
PHP Code Sniffer
continue-on-error
:
true
run
:
php vendor/bin/phpcs src/
-
name
:
Psalm
continue-on-error
:
true
uses
:
docker://vimeo/psalm-github-actions
-
name
:
Psalter
continue-on-error
:
true
run
:
php vendor/bin/psalter --issues=UnnecessaryVarAnnotation --dry-run
This diff is collapsed.
Click to expand it.
.travis.yml
deleted
100644 → 0
+
0
−
137
View file @
879588a5
sudo
:
required
language
:
php
# Stage order
stages
:
-
pre-conditions
-
test
-
quality
-
build
################
# Test stage #
################
php
:
-
7.4
# - nightly
env
:
-
COMMAND="composer install"
-
COMMAND="composer update"
before_script
:
-
${COMMAND}
script
:
-
php vendor/bin/phpunit --no-coverage
jobs
:
fast_finish
:
true
allow_failures
:
-
php
:
7.4
env
:
Psalm
-
php
:
7.4
env
:
Security check (composer install)
-
php
:
7.4
env
:
Security check (composer update)
-
php
:
7.4
env
:
PHP Codesniffer
include
:
##########################
# Pre-conditions stage #
##########################
-
stage
:
pre-conditions
php
:
7.4
env
:
Syntax check PHP
before_script
:
-
composer install
script
:
-
vendor/bin/check-syntax-php.sh
# - stage: pre-conditions
# php: nightly
# env: Syntax check PHP
# before_script:
# - composer install
# script:
# - vendor/bin/check-syntax-php.sh
-
stage
:
pre-conditions
env
:
Syntax check YAML / XML / JSON
before_script
:
-
composer update
script
:
-
vendor/bin/check-syntax-yaml.sh
-
vendor/bin/check-syntax-xml.sh
-
vendor/bin/check-syntax-json.sh
###################
# Quality stage #
###################
-
stage
:
quality
php
:
7.4
env
:
Security check (composer install)
before_script
:
-
composer install
script
:
-
vendor/bin/security-checker security:check
-
stage
:
quality
php
:
7.4
env
:
Security check (composer update)
before_script
:
-
composer update
script
:
-
vendor/bin/security-checker security:check
-
stage
:
quality
php
:
7.4
env
:
Codecov
before_script
:
-
composer update
-
XDEBUG_MODE=coverage php vendor/bin/phpunit
script
:
-
bash <(curl -s https://codecov.io/bash)
-
stage
:
quality
php
:
7.4
env
:
Psalm
before_script
:
-
composer update
script
:
-
vendor/bin/psalm
-
vendor/bin/psalter --issues=UnnecessaryVarAnnotation --dry-run
-
stage
:
quality
php
:
7.4
env
:
PHP Codesniffer
before_script
:
-
composer update
script
:
-
vendor/bin/phpcs
###################
# Build stage #
###################
-
stage
:
build
env
:
NPM build
language
:
node_js
node_js
:
10
before_script
:
-
npm install
-
npm audit fix
script
:
-
npm run build
notifications
:
slack
:
secure
:
jgkeIXi7Hzkc907ZKGpuJZ9va+KjHNV0LZoWc22skkDqNIu2wshvqx4wOMFK8CXtRcRgCambtXxyTio17Q4B4mFu1uf7qVN6x18QyLNhfypB/d808kLoJCzlmGB7477jrw5xvgSVOMxWmic8QTjkcMOWSiG4fJE86zIthZP0OOY=
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment