Skip to content

[pre-commit.ci] pre-commit autoupdate #124

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #124

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: master
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
kiwitcms-url: [public.tenant.kiwitcms.org, tcms.kiwitcms.org]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: composer:v2
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Runs a single command using the runners shell
- name: Run php-stan
run: make stan
continue-on-error: true
# Runs a set of commands using the runners shell
- name: Run php-cs
run: make cs
- name: Prepare ~/.tcms.conf
run: |
echo "[tcms]" > ~/.tcms.conf
echo "url = https://${{ matrix.kiwitcms-url }}/xml-rpc/" >> ~/.tcms.conf
echo "username = kiwitcms-bot" >> ~/.tcms.conf
echo "password = ${{ secrets.TCMS_PASSWORD }}" >> ~/.tcms.conf
- name: Execute test suite and report to ${{ matrix.kiwitcms-url }}
run: |
export TCMS_PRODUCT=$GITHUB_REPOSITORY
# branch name or pull/123
export TCMS_PRODUCT_VERSION=$(echo $GITHUB_REF | sed "s|refs/heads/||" | sed "s|refs/||" | sed "s|/merge||")
# short commit number
export TCMS_BUILD=$(echo $GITHUB_SHA | cut -c1-7)
make phpunit
- name: Send coverage to CodeCov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
files: coverage.xml