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)
|
2022-05-15 13:37:01 +00:00
|
|
|
# 2. Launch the development server, and update the installation
|
|
|
|
# 3. Run unit tests within the docker context
|
2021-10-07 11:00:03 +00:00
|
|
|
|
|
|
|
name: Docker Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
- 'stable'
|
|
|
|
|
2022-05-15 13:37:01 +00:00
|
|
|
pull_request:
|
|
|
|
branches-ignore:
|
|
|
|
- l10*
|
|
|
|
|
2021-10-07 11:00:03 +00:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build Docker Image
|
|
|
|
run: |
|
|
|
|
cd docker
|
2022-05-15 13:37:01 +00:00
|
|
|
docker-compose build
|
|
|
|
docker-compose run inventree-dev-server invoke update
|
|
|
|
docker-compose up -d
|
|
|
|
- name: Wait for Server
|
|
|
|
run: |
|
|
|
|
cd docker
|
|
|
|
docker-compose run inventree-dev-server invoke wait
|
|
|
|
- name: Run unit tests
|
2021-10-07 11:00:03 +00:00
|
|
|
run: |
|
2022-05-15 13:37:01 +00:00
|
|
|
cd docker
|
|
|
|
docker-compose run inventree-dev-server invoke test
|