Skip to content

Create tests for action #5

Create tests for action

Create tests for action #5

Workflow file for this run

name: Test
on:
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Checkout Looker Janitor
uses: actions/checkout@v2
with:
repository: alhankeser/looker-janitor
path: looker-janitor
ref: dev
- name: setup_test_order_field_types
shell: bash
run: |
cp looker-janitor/tests/test_files/test_order_field_types/input.view.lkml looker-janitor/tests/test_files/test_order_field_types/output.view.lkml
- name: test_order_field_types
id: test_order_field_types
uses: alhankeser/looker-janitor-action@dev
with:
files: |
looker-janitor/tests/test_files/test_order_field_types/output.view.lkml
- name: check_test_order_field_types
id: check_test_order_field_types
shell: bash
run: |
if diff -s "looker-janitor/tests/test_files/test_order_field_types/output.view.lkml" "looker-janitor/tests/test_files/test_order_field_types/expected.view.lkml"; then
files_match=true
else
files_match=false
fi
echo "result=$files_match" >> $GITHUB_OUTPUT
- name: print results
shell: bash
run: |
echo ${{ steps.check_test_order_field_types.outputs.files_match }}