name: Audit bugsnag-php dependency licenses

on: [push, pull_request]

jobs:
  license-audit:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: install PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-version }}
        coverage: none
        extensions: intl, mbstring


    - name: Fetch decisions.yml
      run: curl https://raw.githubusercontent.com/bugsnag/license-audit/master/config/decision_files/global.yml -o decisions.yml

    - name: Install composer dependencies
      run: |
        pip3 install '.[flask]'
        pip3 freeze --local | tee requirements.txt

    - name: Run License Finder
      # for some reason license finder doesn't run without a login shell (-l)
      run: >
        docker run -v $PWD:/scan licensefinder/license_finder /bin/bash -lc "
          cd /scan &&
          license_finder --decisions-file decisions.yml --composer-check-require-only=true
        "
name: Audit bugsnag-php dependency licenses

on: [push, pull_request]

jobs:
  license-audit:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: install PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: '8.0'
        coverage: none
        extensions: intl, mbstring


    - name: Fetch decisions.yml
      run: curl https://raw.githubusercontent.com/bugsnag/license-audit/master/config/decision_files/global.yml -o decisions.yml

    - name: Install composer dependencies
      run: composer install

    - name: Run License Finder
      # for some reason license finder doesn't run without a login shell (-l)
      run: >
        docker run -v $PWD:/scan licensefinder/license_finder /bin/bash -lc "
          cd /scan &&
          license_finder --decisions-file decisions.yml --composer-check-require-only=true
        "
Update PHP version and composer installation step
License-finder: Update PHP version and composer installation step
