Git Product home page Git Product logo

diff-action's Introduction

diff-action

Diff Action Test (FILE Passed) Diff Action Test (FILE Failed)

Diff Action Test (LINE Passed) Diff Action Test (LINE Failed)

diff-action

Github Action to compare 2 files using diff ๐Ÿ•ต๏ธ


๐Ÿ–ฅ Supported OS

OS SUPPORTED
LINUX YES
MACOS YES
WINDOWS YES

๐Ÿ“š How to use this action?

The actions/checkout is mandatory to use this action, as it will need to access the repository files.

Field Mandatory Observation
first_file_path YES ex: path/to/file1.txt
second_file_path YES ex: path/to/file2.txt
expected_result NO PASSED (default) or FAILED
specific_line NO ex: 1 (integer value only)

Will return FAIL: If the diff output of the 2 files/lines is different than the expected_result input value.

Will return SUCCESS: If the diff output of the 2 files/lines is equal the expected_result input value.


๐Ÿ•ต๏ธ๐Ÿ“‹ Comparing 2 files

Expecting files to be identicals

    steps:
      - uses: actions/[email protected]
      - uses: GuillaumeFalourd/diff-action@v1
        with:
          first_file_path: path/to/file1.txt
          second_file_path: path/to/file2.txt
          expected_result: PASSED

Expecting files to be differents

    steps:
      - uses: actions/[email protected]
      - uses: GuillaumeFalourd/diff-action@v1
        with:
          first_file_path: path/to/file1.txt
          second_file_path: path/to/file2.txt
          expected_result: FAILED

๐Ÿ•ต๐Ÿ“ Comparing 2 lines

Expecting lines to be identicals

    steps:
      - uses: actions/[email protected]
      - uses: GuillaumeFalourd/diff-action@v1
        with:
          first_file_path: path/to/file1.txt
          second_file_path: path/to/file2.txt
          specific_line: 3
          expected_result: PASSED

Expecting lines to be differents

    steps:
      - uses: actions/[email protected]
      - uses: GuillaumeFalourd/diff-action@v1
        with:
          first_file_path: path/to/file1.txt
          second_file_path: path/to/file2.txt
          specific_line: 3
          expected_result: FAILED

โ˜‘๏ธ๐Ÿ”ด Workflow examples returning error

Diff Action Test (FILE Error) : Workflow with test returning ERROR (File) ๐Ÿ“‹

Diff Action Test (LINE Error) : Workflow with test returning ERROR (Line) ๐Ÿ“

Licensed

This repository uses the Apache License 2.0

diff-action's People

Contributors

guillaumefalourd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.