Skip to content

Commit

Permalink
👷 Extract prepare action.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalkrupinski committed Jun 29, 2024
1 parent 0b37f6e commit 40248f9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 16 deletions.
25 changes: 25 additions & 0 deletions .github/actions/prepare/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Common Steps

on:
workflow_call

jobs:
common-steps:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: '1.8.3'

- name: Install dependencies
run: poetry install --no-root
20 changes: 4 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Test

on:
push:
branches:
Expand All @@ -11,22 +13,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: '1.8.3'

- name: Install dependencies
run: |
poetry install
- name: Prepare environment
uses: ./.github/actions/prepare

- name: Run pytest
run: |
Expand Down

0 comments on commit 40248f9

Please sign in to comment.