-
Notifications
You must be signed in to change notification settings - Fork 1.2k
37 lines (28 loc) · 1020 Bytes
/
prices_check.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
# .github/workflows/app.yaml
name: Token Prices Automation
on:
workflow_dispatch:
pull_request:
paths:
- 'dbt_subprojects/tokens/models/prices/*/*.sql'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
token-prices-test:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Fetch base commit
run: git fetch origin ${{ github.event.pull_request.base.sha }}
- name: Fetch head commit
run: git fetch origin ${{ github.event.pull_request.head.sha }}
- name: Get prices diff
shell: bash
run: |
git diff ${{ github.event.pull_request.base.sha}}..${{ github.event.pull_request.head.sha }} dbt_subprojects/tokens/models/prices/**/*.sql | grep '^\+ ' > scripts/new_lines.txt
- name: Run validations
id: validations
run: python scripts/check_tokens.py --file_name scripts/new_lines.txt