-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
58 lines (57 loc) · 1.72 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: 'Swiple Data Quality Check Action'
description: 'Automatically validate datasets with Swiple GitHub action, get detailed reports in PRs for seamless data quality management.'
author: 'Swiple'
branding:
icon: 'check-circle'
color: 'blue'
inputs:
api_base_url:
description: 'The base URL for the Swiple API'
required: true
ui_base_url:
description: 'The base URL for the Swiple UI'
required: true
username:
description: 'Username for API authentication'
required: true
password:
description: 'Password for API authentication'
required: true
dataset_id:
description: 'Dataset ID to validate'
required: true
github_token:
description: 'Github token'
required: true
require_all_passed:
description: 'Causes build to fail if any expectations fail'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- run: |
python -m pip install --upgrade pip
pip install poetry
shell: bash
- run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
poetry install
shell: bash
- run: |
./.venv/bin/python $GITHUB_ACTION_PATH/validate_dataset.py
shell: bash
env:
API_BASE_URL: ${{ inputs.api_base_url }}
UI_BASE_URL: ${{ inputs.ui_base_url }}
USERNAME: ${{ inputs.username }}
PASSWORD: ${{ inputs.password }}
DATASET_ID: ${{ inputs.dataset_id }}
INPUT_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ inputs.github_token }}
REQUIRE_ALL_PASSED: ${{ inputs.require_all_passed }}