From 8e8c312d22a5f102963dd7a38de849215abfdfe1 Mon Sep 17 00:00:00 2001 From: Majk Shkurti Date: Fri, 18 Aug 2023 13:54:16 +0200 Subject: [PATCH] fix: add workflows --- .github/actions/client-cache-build/action.yml | 2 +- .github/actions/pnpm-install/action.yml | 8 ++-- .github/actions/poetry-install/action.yml | 48 +++++++++++++++++++ .github/workflows/api-deploy.yml | 0 .github/workflows/api-pr.yml | 0 .github/workflows/api-release.yml | 0 .github/workflows/api-test.yml | 0 .github/workflows/client-deploy.yml | 0 .github/workflows/client-release.yml | 0 .github/workflows/client-test.yml | 0 .github/workflows/docs-deploy.yml | 0 .github/workflows/docs-pr.yml | 0 .github/workflows/docs-release.yml | 0 .github/workflows/geoapi-deploy.yml | 0 .github/workflows/geoapi-pr.yml | 0 .github/workflows/geoapi-release.yml | 0 .github/workflows/geoapi-test.yml | 0 17 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 .github/actions/poetry-install/action.yml create mode 100644 .github/workflows/api-deploy.yml create mode 100644 .github/workflows/api-pr.yml create mode 100644 .github/workflows/api-release.yml create mode 100644 .github/workflows/api-test.yml create mode 100644 .github/workflows/client-deploy.yml create mode 100644 .github/workflows/client-release.yml create mode 100644 .github/workflows/client-test.yml create mode 100644 .github/workflows/docs-deploy.yml create mode 100644 .github/workflows/docs-pr.yml create mode 100644 .github/workflows/docs-release.yml create mode 100644 .github/workflows/geoapi-deploy.yml create mode 100644 .github/workflows/geoapi-pr.yml create mode 100644 .github/workflows/geoapi-release.yml create mode 100644 .github/workflows/geoapi-test.yml diff --git a/.github/actions/client-cache-build/action.yml b/.github/actions/client-cache-build/action.yml index b0b747e01..6c7beb3d2 100644 --- a/.github/actions/client-cache-build/action.yml +++ b/.github/actions/client-cache-build/action.yml @@ -1,4 +1,4 @@ -name: 'Cache production build binaries' +name: "Cache production build binaries" description: "Cache or restore if necessary" inputs: diff --git a/.github/actions/pnpm-install/action.yml b/.github/actions/pnpm-install/action.yml index 4197fdb00..e6d47404c 100644 --- a/.github/actions/pnpm-install/action.yml +++ b/.github/actions/pnpm-install/action.yml @@ -13,12 +13,12 @@ ######################################################################################## -name: 'PNPM install' -description: 'Run pnpm install with cache enabled' +name: "PNPM install" +description: "Run pnpm install with cache enabled" inputs: enable-corepack: - description: 'Enable corepack' + description: "Enable corepack" required: false default: 'false' cwd: @@ -26,7 +26,7 @@ inputs: required: false default: '.' node_version: - description: 'Node version to use' + description: "Node version to use" required: false default: v18.x diff --git a/.github/actions/poetry-install/action.yml b/.github/actions/poetry-install/action.yml new file mode 100644 index 000000000..6981a38d9 --- /dev/null +++ b/.github/actions/poetry-install/action.yml @@ -0,0 +1,48 @@ +name: "Poetry install" +description: "Run poetry install with cache enabled" + +inputs: + cwd: + description: "Changes process.cwd() if the project is not located on the root. Default to process.cwd()" + required: false + default: "." + python_version: + description: "Python version to use" + required: false + default: 3.11.4 + +runs: + using: "composite" + steps: + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ inputs.python_version }} + + - name: Load cached Poetry installation + id: cached-poetry + uses: actions/cache@v3 + with: + path: ~/.local + key: poetry-0 + + - name: Install Poetry + if: steps.cached-poetry.outputs.cache-hit != 'true' + uses: snok/install-poetry@v1.3.3 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('${{ inputs.cwd }}/poetry.lock') }} + + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + working-directory: ${{ inputs.cwd }} + run: poetry install --no-interaction --no-root + shell: bash diff --git a/.github/workflows/api-deploy.yml b/.github/workflows/api-deploy.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/api-pr.yml b/.github/workflows/api-pr.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/api-release.yml b/.github/workflows/api-release.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/api-test.yml b/.github/workflows/api-test.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/client-deploy.yml b/.github/workflows/client-deploy.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/client-release.yml b/.github/workflows/client-release.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/client-test.yml b/.github/workflows/client-test.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/docs-release.yml b/.github/workflows/docs-release.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/geoapi-deploy.yml b/.github/workflows/geoapi-deploy.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/geoapi-pr.yml b/.github/workflows/geoapi-pr.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/geoapi-release.yml b/.github/workflows/geoapi-release.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.github/workflows/geoapi-test.yml b/.github/workflows/geoapi-test.yml new file mode 100644 index 000000000..e69de29bb