ohseesoftware/caddy-config-php

View on GitHub
.github/workflows/Build.yml

Summary

Maintainability
Test Coverage
name: Build
on: [push]
jobs:
  test:
    name: Test
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@master
      - name: Checkout
        run: git checkout "${GITHUB_REF:11}"
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '7.3'
          coverage: xdebug
      - name: Composer Install
        run: composer install
      - name: PHPCS
        run: ./vendor/bin/phpcs src tests
      - name: Run Tests
        run: ./vendor/bin/phpunit --coverage-clover build/coverage.xml
      - name: Coveralls
        run: ./vendor/bin/php-coveralls -v --coverage_clover build/coverage.xml --json_path build/coveralls-upload.json
        env:
          COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
  release:
    name: Release
    if: github.ref == 'refs/heads/master'
    needs: test
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@master
      - name: Checkout
        run: git checkout "${GITHUB_REF:11}"
      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 12
      - name: Install dependencies
        run: yarn install
      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: npx semantic-release@15