2021-10-07 11:00:03 +00:00
|
|
|
# Test that the InvenTree docker image compiles correctly
|
|
|
|
|
|
|
|
# This CI action runs on pushes to either the master or stable branches
|
|
|
|
|
|
|
|
# 1. Build the development docker image (as per the documentation)
|
|
|
|
# 2. Install requied python libs into the docker container
|
|
|
|
# 3. Launch the container
|
|
|
|
# 4. Check that the API endpoint is available
|
|
|
|
|
|
|
|
name: Docker Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
- 'stable'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build Docker Image
|
|
|
|
run: |
|
|
|
|
cd docker
|
2021-12-21 05:14:04 +00:00
|
|
|
docker-compose -f docker-compose.sqlite.yml build
|
|
|
|
docker-compose -f docker-compose.sqlite.yml run inventree-dev-server invoke update
|
|
|
|
docker-compose -f docker-compose.sqlite.yml up -d
|
2021-10-07 11:00:03 +00:00
|
|
|
- name: Sleepy Time
|
|
|
|
run: sleep 60
|
|
|
|
- name: Test API
|
|
|
|
run: |
|
|
|
|
pip install requests
|
|
|
|
python3 ci/check_api_endpoint.py
|