maxcanna/gplaybadge

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: CI

on: [push]

jobs:
  fixups:
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@v1
    - name: Check if there are fixup commits
      run: git log --pretty=format:%s origin/master.. | xargs | grep -v fixup
  ci:
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@v1
    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: '7.4'
        extensions: imagick, gd, newrelic
    - name: Install composer
      run: curl -sS https://getcomposer.org/installer | php
    - name: Install php libraries
      run: php composer.phar install
    - name: Setup node
      uses: actions/setup-node@v1
      with:
        node-version: 14.16.1
    - name: Lint
      run: npx eslint@^5.9.0 .
    - name: Run test
      env:
        RAPIDAPI_KEY: ${{ secrets.RAPIDAPI_KEY }}
      run: |
        sh ./test.sh
    - name: Upload badge as artifact
      uses: actions/upload-artifact@v2
      with:
       name: badge
       path: badge.png