Skip to content

test step on github runner #7

test step on github runner

test step on github runner #7

Workflow file for this run

name: Deploy urlshortener by runner
on:
push:
branches: [ "main" ]
paths:
- urlshortener/**
- .github/workflows/**
defaults:
run:
working-directory: urlshortener
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: setup tests
run: docker compose run --build --rm app server db_setup test
- name: run tests
run: docker compose run --build --rm test tests
prepare-environment:
needs: test
runs-on: self-hosted
steps:
- name: Stop and remove containers, networks
run: docker compose down
- name: Remove unused data
run: docker system prune -a -f
deploy:
runs-on: self-hosted
needs: prepare-environment
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: dev setup
run: docker compose run --build --rm app server db_setup dev
- name: dev up
env:
SERVICE_HOST: ${{ vars.SERVICE_HOST }}
run: docker compose up -d