Skip to content

Commit

Permalink
CD: add caching, move py and node versions to env
Browse files Browse the repository at this point in the history
  • Loading branch information
Privat33r-dev committed Apr 29, 2024
1 parent df89191 commit 18c222d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: cd

env:
PYTHON_VERSION: "3.10"

on:
push:
tags:
Expand Down Expand Up @@ -28,6 +31,9 @@ jobs:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'poetry'

- name: Install dependencies
run: pip install poetry
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: tests

env:
PYTHON_VERSION: "3.10"
NODE_VERSION: "20"

on:
push:
paths-ignore:
Expand Down Expand Up @@ -33,7 +37,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
cache: 'poetry'
- name: Install dependencies
run: |
pip install poetry
Expand All @@ -54,7 +59,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
cache: 'poetry'
- name: Install dependencies
run: |
pip install poetry
Expand All @@ -64,7 +70,8 @@ jobs:
poetry install
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install deps and run server
run: |
cd tests/apollo-server
Expand Down Expand Up @@ -98,7 +105,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
cache: 'poetry'
- name: Install dependencies
run: |
pip install poetry
Expand Down

0 comments on commit 18c222d

Please sign in to comment.