Skip to content

Commit 2cb42db

Browse files
🔨 Add a github action for Bash Tests
1 parent 85ff7b3 commit 2cb42db

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/bash_tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Bash Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
# Setup Python
18+
- uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.12'
21+
22+
# Cache the installation of Poetry itself
23+
- name: cache poetry install
24+
uses: actions/cache@v2
25+
with:
26+
path: ~/.local
27+
key: poetry-1.7.1-0
28+
29+
# Install Poetry
30+
- uses: snok/install-poetry@v1
31+
with:
32+
version: 1.8.3
33+
virtualenvs-create: true
34+
virtualenvs-in-project: true
35+
36+
# Cache dependencies
37+
- name: cache deps
38+
id: cache-deps
39+
uses: actions/cache@v2
40+
with:
41+
path: .venv
42+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
43+
44+
# Install dependencies
45+
- run: poetry install --no-interaction --no-root
46+
if: steps.cache-deps.outputs.cache-hit != 'true'
47+
48+
# Run tests
49+
- run: poetry run pytest tests/test_*.py

0 commit comments

Comments
 (0)