Skip to content

[⚡️] - Releasing alpha #1

[⚡️] - Releasing alpha

[⚡️] - Releasing alpha #1

Workflow file for this run

name: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
IMAGE: linkos-dev
CACHE_KEY: linkos-dev-${{ github.event.pull_request.head.sha }}
on:
pull_request:
jobs:
setup:
name: Build Linkos Image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Linkos
uses: docker/build-push-action@v3
with:
context: .
push: false
tags: ${{ env.IMAGE }}
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/${{ env.IMAGE }}.tar
build-args: |
DEBUG=false
TESTING=true
VERSION=dev
- name: Cache Docker Image
uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}
path: /tmp/${{ env.IMAGE }}.tar
e2e_api_test:
name: E2E API Test
runs-on: ubuntu-latest
needs: setup
steps:
- name: checkout
uses: actions/checkout@v3
- name: Load Cache
uses: actions/cache@v4
with:
key: ${{ env.CACHE_KEY }}
path: /tmp/${{ env.IMAGE }}.tar
fail-on-cache-miss: true
- name: Load Linkos
run: |
docker load --input /tmp/${{ env.IMAGE }}.tar
docker compose -f docker-compose.ci.yml up -d
sleep 10
- name: Install bun
uses: oven-sh/setup-bun@v1
- name: run tests
working-directory: ./e2e
run: bun test