Skip to content

Commit adff865

Browse files
committed
Move validation test suite to GitHub Workflows
- Perform a shallow clone of submodules analyzed in validation test suite in GitHub workflows (should take around 30 seconds) - Switch badge in README.md to GitHub Workflows and update default branch for badge. - Remove travis config - After microsoft#385 is merged run_phpstan.sh can remove the separate install step (as a followup PR)
1 parent a35ec03 commit adff865

File tree

5 files changed

+12
-47
lines changed

5 files changed

+12
-47
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ tests/output
1313
**/.*.swp
1414
**/.*.swo
1515
**/Dockerfile
16+
ci/*_dockerized.sh
1617
.dockerignore

.github/workflows/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,25 @@ jobs:
2727
# NOTE: If this is not quoted, the yaml parser will convert numbers such as 8.0 to the number 8,
2828
# and the docker image `php:8` is the latest minor version of php 8.x (8.1).
2929
- PHP_VERSION: '7.2'
30+
STATIC_ANALYSIS: true
3031
- PHP_VERSION: '7.3'
3132
- PHP_VERSION: '7.4'
3233
- PHP_VERSION: '8.0'
3334
- PHP_VERSION: '8.1'
34-
- PHP_VERSION: '8.2.0beta2'
35+
- PHP_VERSION: '8.2.0RC2'
3536

3637
# Steps represent a sequence of tasks that will be executed as part of the job
3738
steps:
3839
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3940
- uses: actions/checkout@v2
4041

42+
# Clone submodules
43+
- name: Checkout submodules for validation tests
44+
run: git submodule update --init --recursive --depth 1
45+
4146
# Runs a single command using the runners shell
4247
- name: Build and test in docker
4348
run: bash ci/run_tests_dockerized.sh ${{ matrix.PHP_VERSION }}
49+
50+
- name: Run static analysis (PHP 7.2 only)
51+
run: if [[ "$STATIC_ANALYSIS" == true ]]; then bash ci/run_tests_dockerized.sh ${{ matrix.PHP_VERSION }}; fi

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Tolerant PHP Parser
2-
[![Build Status](https://travis-ci.org/Microsoft/tolerant-php-parser.svg?branch=master)](https://travis-ci.org/Microsoft/tolerant-php-parser)
2+
[![Build Status](https://github.com/microsoft/tolerant-php-parser/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/microsoft/tolerant-php-parser/actions/workflows/main.yml?query=branch%3Amain)
33

44
This is an early-stage PHP parser designed, from the beginning, for IDE usage scenarios (see [Design Goals](#design-goals) for more details). There is
55
still a ton of work to be done, so at this point, this repo mostly serves as

ci/run_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ set -xe
77
php -d short_open_tag=0 ./vendor/bin/phpunit --testsuite invariants
88
php -d short_open_tag=0 ./vendor/bin/phpunit --testsuite grammar
99
php -d short_open_tag=0 ./vendor/bin/phpunit --testsuite api
10+
php -d short_open_tag=0 ./vendor/bin/phpunit --testsuite validation

0 commit comments

Comments
 (0)