Skip to content

Commit

Permalink
Merge 8461b7e into 9c0af38
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis authored Mar 11, 2024
2 parents 9c0af38 + 8461b7e commit 36729f0
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 30 deletions.
94 changes: 64 additions & 30 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,39 +67,70 @@ jobs:
run: OUTPUT=junit make demo-github --no-print-directory
continue-on-error: true

php:
name: Pure PHP

github-actions:
name: GitHub Actions
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: 👍 Valid CSV file
uses: jbzoo/csv-blueprint@master
with:
php-version: 8.3
tools: composer
csv: tests/fixtures/demo.csv
schema: tests/schemas/demo_valid.yml

- name: Build the Project
run: make build-install --no-print-directory
- name: 👎 Invalid CSV file - Report as GitHub Annotations
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/demo.csv
schema: tests/schemas/demo_invalid.yml
continue-on-error: true

- name: 👎 Invalid CSV file - Report as Table
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/demo.csv
schema: tests/schemas/demo_invalid.yml
output: table
continue-on-error: true


docker:
name: Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Pull Docker Image
run: docker pull jbzoo/csv-blueprint

- name: 👍 Valid CSV file
run: |
./csv-blueprint \
docker run \
-v `pwd`:/parent-host \
--rm jbzoo/csv-blueprint \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_valid.yml
--csv=/parent-host/tests/fixtures/demo.csv \
--schema=/parent-host/tests/schemas/demo_valid.yml
- name: 👎 Invalid CSV file
run: |
./csv-blueprint \
docker run \
-v `pwd`:/parent-host \
--rm jbzoo/csv-blueprint \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_invalid.yml
--csv=/parent-host/tests/fixtures/demo.csv \
--schema=/parent-host/tests/schemas/demo_invalid.yml
continue-on-error: true


phar:
name: Phar
runs-on: ubuntu-latest
Expand All @@ -119,47 +150,50 @@ jobs:
run: make build --no-print-directory

- name: 👍 Valid CSV file
run: |
run: |
./build/csv-blueprint.phar \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_valid.yml
- name: 👎 Invalid CSV file
run: |
run: |
./build/csv-blueprint.phar \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_invalid.yml
continue-on-error: true

docker:
name: Docker Hub

php:
name: Pure PHP
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Pull Docker Image
run: docker pull jbzoo/csv-blueprint
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer

- name: Build the Project
run: make build-install --no-print-directory

- name: 👍 Valid CSV file
run: |
docker run \
-v `pwd`:/parent-host \
--rm jbzoo/csv-blueprint \
./csv-blueprint \
validate:csv \
--csv=/parent-host/tests/fixtures/demo.csv \
--schema=/parent-host/tests/schemas/demo_valid.yml
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_valid.yml
- name: 👎 Invalid CSV file
run: |
docker run \
-v `pwd`:/parent-host \
--rm jbzoo/csv-blueprint \
./csv-blueprint \
validate:csv \
--csv=/parent-host/tests/fixtures/demo.csv \
--schema=/parent-host/tests/schemas/demo_invalid.yml
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_invalid.yml
continue-on-error: true
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,25 @@ jobs:
- name: Reporting example via Docker
run: make demo-docker --no-print-directory
continue-on-error: true

github-action:
name: GitHub Action
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: 👍 Valid CSV file
uses: ./
with:
csv: tests/fixtures/demo.csv
schema: tests/schemas/demo_valid.yml

- name: 👎 Invalid CSV file
uses: ./
with:
csv: tests/fixtures/demo.csv
schema: tests/schemas/demo_invalid.yml
continue-on-error: true

0 comments on commit 36729f0

Please sign in to comment.