Skip to content

DIFF Action 🕵️

Actions
Github Action to compare 2 files using diff 🕵️
v1
Latest
Star (2)

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/checkout@v2.3.4
      - 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/checkout@v2.3.4
      - 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/checkout@v2.3.4
      - 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/checkout@v2.3.4
      - 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 🕵️ is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Github Action to compare 2 files using diff 🕵️
v1
Latest

DIFF Action 🕵️ is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.