Skip to content

Refactor docker workflow for better compatibility #38

Refactor docker workflow for better compatibility

Refactor docker workflow for better compatibility #38

Workflow file for this run

#
# JBZoo Toolbox - Csv-Blueprint.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @see https://github.com/JBZoo/Csv-Blueprint
#
name: Demo
on:
pull_request:
branches:
- "*"
push:
branches:
- 'master'
env:
COLUMNS: 120
TERM_PROGRAM: Hyper
jobs:
reports:
name: All Report Types
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer
- name: Build the Project
run: make update
- name: Report - Table (Default)
run: make demo-github --no-print-directory
continue-on-error: true
- name: Report - Text
run: OUTPUT=text make demo-github --no-print-directory
continue-on-error: true
- name: Report - Github Actions
run: OUTPUT=github make demo-github --no-print-directory
continue-on-error: true
- name: Report - GitLab
run: OUTPUT=gitlab make demo-github --no-print-directory
continue-on-error: true
- name: Report - TeamCity CI
run: OUTPUT=teamcity make demo-github --no-print-directory
continue-on-error: true
- name: Report - JUnit
run: OUTPUT=junit make demo-github --no-print-directory
continue-on-error: true
php:
name: Pure PHP
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- 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: |
./csv-blueprint \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_valid.yml
- name: 👎 Invalid CSV file
run: |
./csv-blueprint \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_invalid.yml
continue-on-error: true
phar:
name: Phar
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer
- name: Build the project
run: make build --no-print-directory
- name: 👍 Valid CSV file
run: |
./build/csv-blueprint.phar \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_valid.yml
- name: 👎 Invalid CSV file
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
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 🐳 Building Docker Image
run: make build-docker
- name: 👍 Valid CSV file
run: |
docker run \
-v `pwd`:/parent-host \
--rm jbzoo/csv-blueprint \
validate:csv \
--csv=/parent-host/tests/fixtures/demo.csv \
--schema=/parent-host/tests/schemas/demo_valid.yml
- name: 👎 Invalid CSV file
run: |
docker run \
-v `pwd`:/parent-host \
--rm jbzoo/csv-blueprint \
validate:csv \
--csv=/parent-host/tests/fixtures/demo.csv \
--schema=/parent-host/tests/schemas/demo_invalid.yml
continue-on-error: true