Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed: use Vizzu prettier and eslint config #282

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
504 changes: 252 additions & 252 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: CI-CD

on:
push:
branches: [main]
pull_request:
branches: [main]
push:
branches: [main]
pull_request:
branches: [main]

jobs:
init:
uses: ./.github/workflows/init.yml
init:
uses: ./.github/workflows/init.yml

ci:
uses: ./.github/workflows/ci.yml
needs: init
ci:
uses: ./.github/workflows/ci.yml
needs: init

doc:
uses: ./.github/workflows/doc.yml
needs: ci
doc:
uses: ./.github/workflows/doc.yml
needs: ci

release:
uses: ./.github/workflows/release.yml
secrets: inherit
needs: doc
release:
uses: ./.github/workflows/release.yml
secrets: inherit
needs: doc
292 changes: 146 additions & 146 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,152 +1,152 @@
name: Documentation

on:
workflow_dispatch:
release:
types: [published]
workflow_call:
workflow_dispatch:
release:
types: [published]
workflow_call:

jobs:
build_docs:
if: ${{ !((github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch') }}

runs-on: ubuntu-22.04

env:
PUPPETEER_CACHE_DIR: ${{ github.workspace }}/node_modules/.chromium

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Cache dev-py environment
uses: actions/cache@v3
with:
path: .venv
key: cache_dev_py_ubuntu22_${{ hashFiles('pdm.lock') }}

- name: Cache dev-js environment
uses: actions/cache@v3
with:
path: node_modules
key: cache_dev_js_ubuntu22_${{ hashFiles('package-lock.json') }}

- name: Cache coverage
uses: actions/cache@v3
with:
path: .coverage/html
key: cache_coverage_${{ github.run_id }}

- name: Install package
run: |
source .venv/bin/activate
pdm run pkg_install

- name: Get vizzu-lib tag
id: vizzu_tag
run: |
source .venv/bin/activate
vizzu_tag=$(./.venv/bin/python ./tools/ci/get_tag.py)
echo "vizzu_tag=${vizzu_tag}" >> $GITHUB_OUTPUT

- name: Checkout vizzu-lib
uses: actions/checkout@v3
with:
repository: vizzuhq/vizzu-lib
fetch-depth: 1
ref: ${{ steps.vizzu_tag.outputs.vizzu_tag }}
path: vizzu-lib

- name: Build documentation
run: |
source .venv/bin/activate
pdm run docs_build

publish_docs:
if: ${{ ((github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch') }}

runs-on: ubuntu-22.04

env:
PUPPETEER_CACHE_DIR: ${{ github.workspace }}/node_modules/.chromium

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Cache dev-py environment
uses: actions/cache@v3
with:
path: .venv
key: cache_dev_py_ubuntu22_${{ hashFiles('pdm.lock') }}

- name: Cache dev-js environment
uses: actions/cache@v3
with:
path: node_modules
key: cache_dev_js_ubuntu22_${{ hashFiles('package-lock.json') }}

- name: Get workflow ID
id: workflow_id
run: |
workflow_data=$(curl -s -X GET \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.VIZZUHQ_GITHUB_API }}" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/actions/workflows")
workflow_id=$(echo $workflow_data | jq -r '.workflows[] | select(.name == "CI-CD") | .id')
echo "workflow_id=${workflow_id}" >> $GITHUB_OUTPUT

- name: Get run ID
id: run_id
run: |
run_data=$(curl -s -X GET \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.VIZZUHQ_GITHUB_API }}" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/actions/workflows/${{ steps.workflow_id.outputs.workflow_id }}/runs?branch=main")
run_id=$(echo $run_data | jq -r '.workflow_runs[0].id')
echo "run_id=${run_id}" >> $GITHUB_OUTPUT

- name: Cache coverage
uses: actions/cache@v3
with:
path: .coverage/html
key: cache_coverage_${{ steps.run_id.outputs.run_id }}

- name: Install package
run: |
source .venv/bin/activate
pdm run pkg_install

- name: Get vizzu-lib tag
id: vizzu_tag
run: |
source .venv/bin/activate
vizzu_tag=$(./.venv/bin/python ./tools/ci/get_tag.py)
echo "vizzu_tag=${vizzu_tag}" >> $GITHUB_OUTPUT

- name: Checkout vizzu-lib
uses: actions/checkout@v3
with:
repository: vizzuhq/vizzu-lib
fetch-depth: 1
ref: ${{ steps.vizzu_tag.outputs.vizzu_tag }}
path: vizzu-lib

- name: Configure Git
run: |
git config --global user.name "${{ env.GIT_USER_NAME }}"
git config --global user.email "${{ env.GIT_USER_EMAIL }}"
build_docs:
if: ${{ !((github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch') }}

runs-on: ubuntu-22.04

env:
PUPPETEER_CACHE_DIR: ${{ github.workspace }}/node_modules/.chromium

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Cache dev-py environment
uses: actions/cache@v3
with:
path: .venv
key: cache_dev_py_ubuntu22_${{ hashFiles('pdm.lock') }}

- name: Cache dev-js environment
uses: actions/cache@v3
with:
path: node_modules
key: cache_dev_js_ubuntu22_${{ hashFiles('package-lock.json') }}

- name: Cache coverage
uses: actions/cache@v3
with:
path: .coverage/html
key: cache_coverage_${{ github.run_id }}

- name: Install package
run: |
source .venv/bin/activate
pdm run pkg_install

- name: Get vizzu-lib tag
id: vizzu_tag
run: |
source .venv/bin/activate
vizzu_tag=$(./.venv/bin/python ./tools/ci/get_tag.py)
echo "vizzu_tag=${vizzu_tag}" >> $GITHUB_OUTPUT

- name: Checkout vizzu-lib
uses: actions/checkout@v3
with:
repository: vizzuhq/vizzu-lib
fetch-depth: 1
ref: ${{ steps.vizzu_tag.outputs.vizzu_tag }}
path: vizzu-lib

- name: Build documentation
run: |
source .venv/bin/activate
pdm run docs_build

publish_docs:
if: ${{ ((github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch') }}

runs-on: ubuntu-22.04

env:
GIT_USER_NAME: David Vegh
GIT_USER_EMAIL: [email protected]

- name: Deploy documentation
run: |
source .venv/bin/activate
git fetch origin gh-pages || echo "gh-pages does not exist"
pdm run docs_deploy
git push origin gh-pages
PUPPETEER_CACHE_DIR: ${{ github.workspace }}/node_modules/.chromium

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Cache dev-py environment
uses: actions/cache@v3
with:
path: .venv
key: cache_dev_py_ubuntu22_${{ hashFiles('pdm.lock') }}

- name: Cache dev-js environment
uses: actions/cache@v3
with:
path: node_modules
key: cache_dev_js_ubuntu22_${{ hashFiles('package-lock.json') }}

- name: Get workflow ID
id: workflow_id
run: |
workflow_data=$(curl -s -X GET \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.VIZZUHQ_GITHUB_API }}" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/actions/workflows")
workflow_id=$(echo $workflow_data | jq -r '.workflows[] | select(.name == "CI-CD") | .id')
echo "workflow_id=${workflow_id}" >> $GITHUB_OUTPUT

- name: Get run ID
id: run_id
run: |
run_data=$(curl -s -X GET \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.VIZZUHQ_GITHUB_API }}" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/actions/workflows/${{ steps.workflow_id.outputs.workflow_id }}/runs?branch=main")
run_id=$(echo $run_data | jq -r '.workflow_runs[0].id')
echo "run_id=${run_id}" >> $GITHUB_OUTPUT

- name: Cache coverage
uses: actions/cache@v3
with:
path: .coverage/html
key: cache_coverage_${{ steps.run_id.outputs.run_id }}

- name: Install package
run: |
source .venv/bin/activate
pdm run pkg_install

- name: Get vizzu-lib tag
id: vizzu_tag
run: |
source .venv/bin/activate
vizzu_tag=$(./.venv/bin/python ./tools/ci/get_tag.py)
echo "vizzu_tag=${vizzu_tag}" >> $GITHUB_OUTPUT

- name: Checkout vizzu-lib
uses: actions/checkout@v3
with:
repository: vizzuhq/vizzu-lib
fetch-depth: 1
ref: ${{ steps.vizzu_tag.outputs.vizzu_tag }}
path: vizzu-lib

- name: Configure Git
run: |
git config --global user.name "${{ env.GIT_USER_NAME }}"
git config --global user.email "${{ env.GIT_USER_EMAIL }}"
env:
GIT_USER_NAME: David Vegh
GIT_USER_EMAIL: [email protected]

- name: Deploy documentation
run: |
source .venv/bin/activate
git fetch origin gh-pages || echo "gh-pages does not exist"
pdm run docs_deploy
git push origin gh-pages
Loading