Skip to content

Commit

Permalink
Update Python version and add caching to GitHub Actions workflow
Browse files Browse the repository at this point in the history
* Change Python version to 3.10
* Add caching for Poetry and pip dependencies using actions/cache@v2
  • Loading branch information
jlantz committed Oct 29, 2024
1 parent 7c42f69 commit e32fe0d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 32 deletions.
58 changes: 34 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
name: Run Tests

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
push:
branches:
- '**'
pull_request:
branches:
- '**'

jobs:
test:
runs-on: ubuntu-latest
test:
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
pip install -e .
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Run tests
run: |
pytest tests/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
pip install -e .
- name: Run tests
run: |
pytest tests/
14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "d2x"
version = "0.1.2"
description = "Composable Salesforce DevOps on GitHub"
description = "Salesforce DevOps Helper"
authors = ["Muselab LLC"]
license = "BSD3"
readme = "README.md"
Expand Down
3 changes: 3 additions & 0 deletions requirements_dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Development dependencies
pytest
-e .

0 comments on commit e32fe0d

Please sign in to comment.