-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1019 Bytes
/
Copy pathbuild_test.yml
File metadata and controls
41 lines (33 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Build_Test
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
docker_build_test:
runs-on: ubuntu-24.04
name: Docker_build
steps:
- uses: actions/checkout@v5
- name: Build the Docker image
run: docker build -t gabrielpalmar/hivebox:$(cat version.txt) .
- name: Run Docker container
run: docker run -d -p 5000:5000 gabrielpalmar/hivebox:$(cat version.txt)
- name: Set up Python for testing
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
pip install vcrpy
- name: Run tests
run: python tests/test_main.py
- name: Stop Docker container
run: docker stop $(docker ps -q)