xref: /php-ast/.github/workflows/main.yml (revision 52ac25d7)
1# Runs php-ast's tests and verifies that the package can be built.
2
3name: CI
4
5# Controls when the action will run.
6on:
7  # Triggers the workflow on push or pull request events but only for the master branch
8  push:
9    branches: [ master ]
10  pull_request:
11    branches: [ master ]
12
13  # Allows you to run this workflow manually from the Actions tab
14  workflow_dispatch:
15
16# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17jobs:
18  # This workflow contains a single job called "build"
19  build:
20    # The type of runner that the job will run on
21    runs-on: ubuntu-latest
22
23    # See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-environment-variables-in-a-matrix
24    strategy:
25      fail-fast: false
26      matrix:
27       include:
28         # NOTE: If this is not quoted, the yaml parser will convert 8.0 to the number 8,
29         # and the docker image `php:8` is the latest minor version of php 8.x (8.1).
30         - PHP_VERSION: '7.2'
31         - PHP_VERSION: '7.3'
32         - PHP_VERSION: '7.4'
33         - PHP_VERSION: '8.0'
34         - PHP_VERSION: '8.1'
35         - PHP_VERSION: '8.2'
36         - PHP_VERSION: '8.3.0RC5'
37
38    # Steps represent a sequence of tasks that will be executed as part of the job
39    steps:
40      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
41      - uses: actions/checkout@v2
42
43      # Runs a single command using the runners shell
44      - name: Build and test in docker
45        run: bash ci/test_dockerized.sh ${{ matrix.PHP_VERSION }}
46