Skip to content

Commit

Permalink
chore: added dev-env-setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
BallardRobinett committed Feb 2, 2024
1 parent 2e196ab commit 8e7f3fe
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/actions/dev-env-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "Set up registration dev environment"
description: "Sets up asdf and configures the cache"
runs:
using: composite
steps:
- name: asdf setup
uses: asdf-vm/actions/setup@v1
- uses: actions/cache@v3
id: asdf-cache-client
with:
path: |
~/.asdf
./client/.tool-versions
key: ${{ runner.os }}-asdf-cache-client-${{ hashFiles('client/.tool-versions') }}
- uses: actions/cache@v3
id: asdf-cache-backend
with:
path: |
~/.asdf
./bc_obps/.tool-versions
key: ${{ runner.os }}-asdf-cache-backend-${{ hashFiles('bc_obps/.tool-versions') }}
- uses: actions/cache@v3
id: yarn-cache
with:
path: |
~/.cache/yarn
./client/node_modules
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('client/yarn.lock') }}-v2
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.9.16"
- name: Install Poetry
uses: snok/install-poetry@v1
- 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('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
working-directory: ./bc_obps
shell: bash
- name: Install server dev tools
working-directory: ./bc_obps
shell: bash
run: |
make install_backend_asdf_tools
make start_pg
make create_db

0 comments on commit 8e7f3fe

Please sign in to comment.