Skip to content

Commit 44b7b13

Browse files
authored
Create unit_tests.yml
1 parent 7d7bf91 commit 44b7b13

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/unit_tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: prometheus_exporter Tests
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.11", "3.12", "3.13"]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install python deps
28+
run: |
29+
python -m venv venv
30+
venv/bin/pip install --upgrade pip
31+
venv/bin/pip install .
32+
- name: Run unit tests
33+
run: |
34+
venv/bin/python -m unittest discover -v tests

0 commit comments

Comments
 (0)