mirror of
https://github.com/Screenly/Anthias.git
synced 2026-02-23 18:16:44 -05:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Run Unit Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- production
|
|
paths:
|
|
- '!README.md'
|
|
- '!webview/**'
|
|
- '!.github/workflows/build-webview.yaml'
|
|
- '!.github/workflows/build-balena-disk-image.yaml'
|
|
- '!docs/**'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- production
|
|
paths:
|
|
- '**/**'
|
|
- '!README.md'
|
|
- '!webview/**'
|
|
- '!.github/workflows/build-webview.yaml'
|
|
- '!.github/workflows/build-balena-disk-image.yaml'
|
|
- '!docs/**'
|
|
workflow_call:
|
|
|
|
jobs:
|
|
run-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build using Docker Compose
|
|
run: |
|
|
docker-compose -f docker-compose.test.yml build
|
|
|
|
- name: Start the test container
|
|
run: |
|
|
docker-compose -f docker-compose.test.yml up -d
|
|
|
|
- name: Run the tests inside the container
|
|
shell: 'script -q -e -c "bash {0}"'
|
|
run: |
|
|
docker-compose -f docker-compose.test.yml exec srly-ose-test bash ./bin/prepare_test_environment.sh -s
|
|
docker-compose -f docker-compose.test.yml exec srly-ose-test nosetests -v -a '!fixme'
|
|
|
|
- name: Stop the test container
|
|
run: |
|
|
docker-compose -f docker-compose.test.yml down
|