|
1 | 1 | name: TestListener
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - branches: |
6 |
| - - master |
| 4 | + # Trigger mega-linter at every push. Action will also be visible from Pull Requests to master |
| 5 | + push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions) |
7 | 6 | pull_request:
|
| 7 | + branches: [master] |
8 | 8 |
|
9 | 9 | jobs:
|
| 10 | + # Cancel duplicate jobs: https://github.com/fkirc/skip-duplicate-actions#option-3-cancellation-only |
| 11 | + cancel_duplicates: |
| 12 | + name: Cancel duplicate jobs |
| 13 | + runs-on: ubuntu-18.04 |
| 14 | + steps: |
| 15 | + - # Cancellation of previous workflow runs |
| 16 | + uses: fkirc/skip-duplicate-actions@master |
| 17 | + with: |
| 18 | + github_token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} |
| 19 | + cancel_others: true |
| 20 | + |
| 21 | + lint_files: |
| 22 | + name: Mega-Linter |
| 23 | + runs-on: ubuntu-18.04 |
| 24 | + steps: |
| 25 | + - # Git Checkout |
| 26 | + name: Checkout Code |
| 27 | + uses: actions/checkout@v2 |
| 28 | + with: |
| 29 | + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} |
| 30 | + fetch-depth: 0 |
| 31 | + |
| 32 | + - # Install dependencies |
| 33 | + name: Install Composer dependencies |
| 34 | + uses: "ramsey/composer-install@v1" |
| 35 | + with: |
| 36 | + dependency-versions: "highest" |
| 37 | + composer-options: "--prefer-dist" |
| 38 | + |
| 39 | + - # Mega-Linter |
| 40 | + name: Mega-Linter |
| 41 | + id: ml |
| 42 | + # You can override Mega-Linter flavor used to have faster performances |
| 43 | + # More info at https://nvuillam.github.io/mega-linter/flavors/ |
| 44 | + uses: nvuillam/mega-linter/flavors/php@v4 |
| 45 | + env: |
| 46 | + # All available variables are described in documentation |
| 47 | + # https://nvuillam.github.io/mega-linter/configuration/ |
| 48 | + # Validates all source when push on master, else just the git diff with master. Override with true if you always want to lint all sources |
| 49 | + VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} |
| 50 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 51 | + # ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY |
| 52 | + # DISABLE: COPYPASTE,SPELL # Uncomment to disable copy-paste and spell checks |
| 53 | + LOG_LEVEL: "debug" |
| 54 | + |
10 | 55 | testlistener:
|
| 56 | + needs: lint_files |
| 57 | + |
11 | 58 | runs-on: ${{ matrix.os }}
|
12 | 59 |
|
13 | 60 | strategy:
|
|
0 commit comments