Skip to content

Commit

Permalink
ci: separate JSON linting from PHP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mledoze committed Sep 25, 2023
1 parent 40baed5 commit d0b691d
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: push

jobs:
test:
php-tests:
name: Tests on PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
Expand All @@ -14,11 +14,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install packages
run: sudo apt-get install -y jsonlint

- name: Lint JSON files
run: find . -type f -name "*.json" | xargs jsonlint-php
- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -42,3 +39,16 @@ jobs:

- name: Test conversion of countries data
run: php countries.php convert

json-lint:
name: Lint JSON files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install packages
run: sudo apt-get install -y jsonlint

- name: Lint JSON files
run: find . -type f -name "*.json" | xargs jsonlint-php

0 comments on commit d0b691d

Please sign in to comment.