Skip to content

Commit

Permalink
GitHub Actions workflow to demo it
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Smet committed Mar 11, 2024
1 parent 9c0af38 commit 9a1b366
Showing 1 changed file with 56 additions and 30 deletions.
86 changes: 56 additions & 30 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,39 +67,62 @@ 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@0.1
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
uses: JBZoo/Csv-Blueprint@0.1
with:
csv: tests/fixtures/demo.csv
schema: tests/schemas/demo_invalid.yml
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 +142,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

0 comments on commit 9a1b366

Please sign in to comment.