-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathupdate-snowflake-feature-coverage.yml
More file actions
78 lines (68 loc) · 2.55 KB
/
update-snowflake-feature-coverage.yml
File metadata and controls
78 lines (68 loc) · 2.55 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Update function coverage docs
on:
schedule:
# "At 00:00 on Sunday."
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
update-function-coverage:
name: Update function coverage docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: localstack-docs
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Checkout private tools
uses: actions/checkout@v4
with:
repository: localstack/snowflake
path: snowflake
token: ${{ secrets.GH_TOKEN }}
- name: Run the script
working-directory: snowflake
env:
PYTHONPATH: ${{ github.workspace }}/snowflake
run: |
pip install localstack-core lxml requests
python ./etc/coverage.py
- name: Move the generated files
run: |
cd localstack-docs
mv ../snowflake/coverage-features.md src/content/docs/snowflake/feature-coverage.md
mv ../snowflake/coverage-functions.md src/content/docs/snowflake/sql-functions.md
mv ../snowflake/coverage-restapi.md src/content/docs/snowflake/features/rest-api-endpoints.md
- name: Parse SQL functions to JSON
working-directory: localstack-docs
run: node scripts/snowflake/parse-sql-functions.mjs
- name: Check for changes
id: check-for-changes
working-directory: localstack-docs
run: |
git add .
if git diff --staged --quiet; then
echo "diff-count=0" >> $GITHUB_OUTPUT
else
echo "diff-count=1" >> $GITHUB_OUTPUT
fi
- name: Create PR
uses: peter-evans/create-pull-request@v7
if: ${{ success() && steps.check-for-changes.outputs.diff-count != '0' && steps.check-for-changes.outputs.diff-count != '' }}
with:
path: localstack-docs
title: "Update function coverage documentation"
body: "Automated update of snowflake feature coverage docs"
branch: "snowflake-feature-coverage-updates"
author: "LocalStack Bot <localstack-bot@users.noreply.github.com>"
committer: "LocalStack Bot <localstack-bot@users.noreply.github.com>"
commit-message: "automated update of snowflake feature coverage docs"
token: ${{ secrets.PRO_ACCESS_TOKEN }}
reviewers: hovaesco, quetzalliwrites