mirror of
https://github.com/getsentry/self-hosted.git
synced 2025-12-08 19:46:14 +00:00
80 lines
2.4 KiB
YAML
80 lines
2.4 KiB
YAML
name: Test
|
|
on:
|
|
# Run CI on all pushes to the master and release/** branches, and on all new
|
|
# pull requests, and on all pushes to pull requests (even if a pull request
|
|
# is not against master).
|
|
push:
|
|
branches:
|
|
- "master"
|
|
- "release/**"
|
|
pull_request:
|
|
schedule:
|
|
- cron: '1 0 * * *'
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
jobs:
|
|
e2e-test:
|
|
runs-on: ubuntu-20.04
|
|
name: "Sentry self-hosted end-to-end tests"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: self-hosted
|
|
- name: End to end tests
|
|
uses: getsentry/action-self-hosted-e2e-tests@f45ef07793b2cc805a9a9401819f486da449a90a
|
|
with:
|
|
project_name: self-hosted
|
|
|
|
unit-test:
|
|
runs-on: ubuntu-20.04
|
|
name: "unit tests"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Unit Tests
|
|
run: ./unit-test.sh
|
|
|
|
integration-test:
|
|
runs-on: ubuntu-20.04
|
|
name: "integration test"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# Disabled due to https://github.com/getsentry/self-hosted/issues/1415
|
|
# - compose_version: "1.28.0"
|
|
# compose_path: "/usr/local/bin"
|
|
# - compose_version: "1.29.2"
|
|
# compose_path: "/usr/local/bin"
|
|
- compose_version: "v2.0.1"
|
|
compose_path: "/usr/local/lib/docker/cli-plugins"
|
|
- compose_version: "v2.7.0"
|
|
compose_path: "/usr/local/lib/docker/cli-plugins"
|
|
env:
|
|
COMPOSE_PROJECT_NAME: self-hosted-${{ strategy.job-index }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Get Compose
|
|
run: |
|
|
# Always remove `docker compose` support as that's the newer version
|
|
# and comes installed by default nowadays.
|
|
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
|
|
sudo rm -f "${{ matrix.compose_path }}/docker-compose"
|
|
sudo mkdir -p "${{ matrix.compose_path }}"
|
|
sudo curl -L https://github.com/docker/compose/releases/download/${{ matrix.compose_version }}/docker-compose-`uname -s`-`uname -m` -o "${{ matrix.compose_path }}/docker-compose"
|
|
sudo chmod +x "${{ matrix.compose_path }}/docker-compose"
|
|
|
|
- name: Integration Test
|
|
run: ./integration-test.sh
|
|
|
|
- name: Inspect failure
|
|
if: failure()
|
|
run: |
|
|
docker compose ps
|
|
docker compose logs
|