Skip to content

Bump docker/setup-qemu-action from 2 to 3 #50

Bump docker/setup-qemu-action from 2 to 3

Bump docker/setup-qemu-action from 2 to 3 #50

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
env:
ENVIRONMENT: debug
DEFAULT_LOCAL: en
TOKEN_DRIVER: local
APP_SSL_KEY: randomLongKey
API_ENDPOINT: /v1/api
BACKUP_CRON: "* * * * *"
NANOID_LETTERS: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz-"
NANOID_LENGTH: 8
KAFKA_NUMBER_OF_PARTITIONS: 1
MAIN_DOMAIN: http://localhost
APPWRITE_ENDPOINT: ${{secrets.APPWRITE_ENDPOINT}}
APPWRITE_PROJECT_ID: ${{secrets.APPWRITE_PROJECT_ID}}
APPWRITE_API_KEY: ${{secrets.APPWRITE_API_KEY}}
REDIS_HOST: redis
REDIS_PORT: 6379
KAFKA_HOSTS: kafka:9092
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: PLAINTEXT
CLICKHOUSE_PROTOCOL: http
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT: 8123
CLICKHOUSE_DB: linkos
CLICKHOUSE_USER: linkos
CLICKHOUSE_PASSWORD: strong_password
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: linkos
POSTGRES_USER: linkos
POSTGRES_PASSWORD: strong_password
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 20
- name: curl health
run: curl localhost/v1/api/health
- name: Install bun
uses: oven-sh/setup-bun@v1
- name: run tests
working-directory: ./e2e
run: bun test