Skip to content

Commit

Permalink
Simplify GA workflow (#75)
Browse files Browse the repository at this point in the history
This commit includes updates to GitHub workflows and dependencies. The
adjustments in workflows corresponds to alteration in triggering
conditions and updating version of 'actions/checkout' while in the
dependencies, corrections have been made to change versions for
different libraries and tools. Some of the changes seem to downgrade the
version which could be to resolve compatibility issues.
  • Loading branch information
SmetDenis authored Mar 23, 2024
1 parent a027de3 commit 97027d7
Show file tree
Hide file tree
Showing 14 changed files with 379 additions and 356 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ action.yml
box.json.dist
phpunit.xml.dist
Makefile
*.phar
90 changes: 44 additions & 46 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,67 +13,73 @@
name: Demo

on:
workflow_run:
workflows: [ CI ]
types: [ completed ]
release:
types: [ created ]

env:
CSV_FILES: './tests/fixtures/batch/*.csv'
VALID_SCHEMA: './tests/schemas/demo_valid.yml'
INVALID_SCHEMA: './tests/schemas/demo_*.yml'
BLUEPRINT_DOCKER: 'docker run --rm --workdir=/parent-host -v .:/parent-host jbzoo/csv-blueprint:latest'


jobs:
reports:
name: All Report Types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Valid CSV file
- name: 👍 Valid CSV files
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/demo.csv
schema: tests/schemas/demo_valid.yml
csv: ${{ env.CSV_FILES }}
schema: ${{ env.VALID_SCHEMA }}

- name: Invalid CSV file - Text
- name: 👎 Invalid CSV files - Default (Table)
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/batch/*.csv
schema: tests/schemas/demo_invalid.yml
report: text
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
continue-on-error: true

- name: Invalid CSV file - Table
- name: Invalid CSV files - Text
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/batch/*.csv
schema: tests/schemas/demo_invalid.yml
report: table
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: text
continue-on-error: true

- name: Invalid CSV file - GitHub Annotations
- name: Invalid CSV files - GitHub Annotations
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/batch/*.csv
schema: tests/schemas/demo_invalid.yml
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
continue-on-error: true

- name: Invalid CSV file - TeamCity
- name: Invalid CSV files - TeamCity
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/batch/*.csv
schema: tests/schemas/demo_invalid.yml
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: teamcity
continue-on-error: true

- name: Invalid CSV file - Gitlab
- name: Invalid CSV files - Gitlab
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/batch/*.csv
schema: tests/schemas/demo_invalid.yml
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: gitlab
continue-on-error: true

- name: Invalid CSV file - JUnit
- name: Invalid CSV files - JUnit
uses: jbzoo/csv-blueprint@master
with:
csv: tests/fixtures/batch/*.csv
schema: tests/schemas/demo_invalid.yml
csv: ${{ env.CSV_FILES }}
schema: ${{ env.INVALID_SCHEMA }}
report: junit
continue-on-error: true

Expand All @@ -82,27 +88,19 @@ jobs:
name: Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

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

- name: 🎨 Test help and logo
run: $BLUEPRINT_DOCKER --ansi

- name: 👍 Valid CSV file
- name: 👍 Valid CSV files
run: |
docker run \
-v `pwd`:/parent-host \
--rm jbzoo/csv-blueprint \
validate:csv \
--csv=/parent-host/tests/fixtures/batch/*.csv \
--schema=/parent-host/tests/schemas/demo_valid.yml \
--ansi
- name: 👎 Invalid CSV file
$BLUEPRINT_DOCKER validate:csv --ansi -vvv --csv=$CSV_FILES --schema=$VALID_SCHEMA
- name: 👎 Invalid CSV files
run: |
! docker run \
-v `pwd`:/parent-host \
--rm jbzoo/csv-blueprint \
validate:csv \
--csv=/parent-host/tests/fixtures/batch/*.csv \
--schema=/parent-host/tests/schemas/demo_invalid.yml \
--ansi
! $BLUEPRINT_DOCKER validate:csv --ansi -vvv --csv=$CSV_FILES --schema=$INVALID_SCHEMA
Loading

0 comments on commit 97027d7

Please sign in to comment.