mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-04 21:54:48 +00:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Test
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- alpha
|
|
- beta
|
|
- main
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Docker Compose
|
|
run: |
|
|
python3 -m pip install docker-compose --upgrade
|
|
|
|
- name: Build
|
|
env:
|
|
ENV: test
|
|
IMAGE_TAG: test
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
run: |
|
|
export ENV=test
|
|
export IMAGE_TAG=test
|
|
docker-compose -f build.docker-compose.yml build --build-arg NPM_TOKEN=${NPM_TOKEN}
|
|
|
|
- name: Run Test
|
|
env:
|
|
ENV: test
|
|
IMAGE_TAG: test
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
run: |
|
|
export ENV=test
|
|
export IMAGE_TAG=test
|
|
docker-compose -f build.docker-compose.yml run -e NPM_TOKEN=${NPM_TOKEN} --rm --entrypoint="npm run test" maestro
|
|
|
|
- name: Remove Docker's Trash
|
|
continue-on-error: true
|
|
run: |
|
|
docker system prune
|
|
docker rmi -f $(docker images -aq)
|