Update README.md #668
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: [push, pull_request] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build the stack alternative origin | |
run: echo "nginx" | ./up.sh | |
if: always() | |
- name: Run Selenium tests | |
run: cd selenium && sleep 90 && sudo docker run --net horahora_default $(docker build -q .) | |
if: always() | |
- name: Build the stack localhost | |
run: echo "localhost" | ./up.sh | |
if: always() | |
- name: Run integration API tests | |
run: cd tests && go run main.go | |
if: always() | |
- name: print relevant logs (videoservice) | |
run: docker logs $(docker ps | grep "videoservice" | awk '{print $1}') | |
if: always() | |
- name: print relevant logs (userservice) | |
run: docker logs $(docker ps | grep "userservice" | awk '{print $1}') | |
if: always() | |
- name: print relevant logs (scheduler) | |
run: docker logs $(docker ps | grep "scheduler" | awk '{print $1}') | |
if: always() | |
- name: print relevant logs (postgres) | |
run: docker logs $(docker ps | grep "postgres" | awk '{print $1}') | |
if: always() | |
- name: print relevant logs (frontapi) | |
run: docker logs $(docker ps | grep "frontapi" | awk '{print $1}') | |
if: always() | |
- name: print relevant logs (nginx) | |
run: docker logs $(docker ps | grep "nginx" | awk '{print $1}') | |
if: always() | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Log in to the Container registry | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build the stack localhost | |
run: echo "localhost" | ./up.sh | |
if: always() | |
- name: publish main | |
uses: pennsignals/[email protected] | |
with: | |
version: main | |
docker_compose: 'docker-compose.yml' # required |