Skip to content

Add port offset to let SMTP servers start for tests #92

Add port offset to let SMTP servers start for tests

Add port offset to let SMTP servers start for tests #92

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
all:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get versions
id: versions
run: |
sed 's/ /_version=/' .tool-versions | tee -a "$GITHUB_OUTPUT"
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ steps.versions.outputs.python_version }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .tool-versions
cache: yarn
cache-dependency-path: frontend/yarn.lock
- name: Install Task
run: |
wget -qO- 'https://github.com/go-task/task/releases/download/v3.28.0/task_linux_amd64.tar.gz' | tar -xz -C /usr/local/bin task
task --version
- name: Test Frontend
run: task test-frontend
- name: Test Backend
env:
PORT_OFFSET: 10000
run: task test-backend
- name: Build frontend
run: task build-frontend
- name: Build Docker Image
run: |
docker build -t lt .
docker run --rm -d -p 3060:80 lt
- name: Test Integration
id: build-test-image
run: task test-integration
- uses: actions/upload-artifact@v3
if: steps.build-test-image.outcome == 'failure'
with:
name: playwright-report
path: intests/playwright-report/
retention-days: 9
- name: Push Docker image to GHCR
if: |
steps.build-test-image.outcome == 'success' && github.ref_name == 'master'
run: |
docker tag lt 'ghcr.io/${{ github.actor }}/littletools'
docker login ghcr.io --username '${{ github.actor }}' --password '${{ secrets.GITHUB_TOKEN }}'
docker push 'ghcr.io/${{ github.actor }}/littletools'