Reinaldy Rafli 2d66a99f23
Revert "Revert "ref: migrate to uv (#4061)"" (#4097)
* Revert "Revert "ref: migrate to uv (#4061)" (#4094)"

This reverts commit f9c0c31f437d0f75afe62708f18b1c661b4e5a2b.

* fix: provide python version

as per 0958463ee0/action.yml (L5-L7)
2025-12-11 07:08:27 +07:00

77 lines
2.6 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: "0 0,12 * * *"
concurrency:
group: ${{ github.ref_name || github.sha }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
unit-test:
if: github.repository_owner == 'getsentry'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
name: ${{ matrix.os == 'ubuntu-24.04-arm' && 'unit tests (arm64)' || 'unit tests' }}
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Get Compose
uses: ./get-compose-action
- name: Unit Tests
run: ./unit-test.sh
integration-test:
if: github.repository_owner == 'getsentry'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
container_engine: ['docker'] # TODO: add 'podman' into the list
compose_profiles: ['feature-complete', 'errors-only']
name: ${{ format('integration test{0}{1}{2}', matrix.os == 'ubuntu-24.04-arm' && ' (arm64)' || '', matrix.container_engine == 'podman' && ' (podman)' || '', matrix.compose_profiles == 'errors-only' && ' (errors-only)' || '') }}
env:
REPORT_SELF_HOSTED_ISSUES: 0
SELF_HOSTED_TESTING_DSN: ${{ vars.SELF_HOSTED_TESTING_DSN }}
CONTAINER_ENGINE_PODMAN: ${{ matrix.container_engine == 'podman' && '1' || '0' }}
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Install Podman
if: matrix.container_engine == 'podman'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends podman
# TODO: Replace below with podman-compose
# We need this commit to be able to work: https://github.com/containers/podman-compose/commit/8206cc3ea277eee6c2e87d4cd66eba8eae3d44eb
pip3 install --user https://github.com/containers/podman-compose/archive/main.tar.gz
echo "PODMAN_COMPOSE_PROVIDER=podman-compose" >> $GITHUB_ENV
echo "PODMAN_COMPOSE_WARNING_LOGS=false" >> $GITHUB_ENV
- name: Use action from local checkout
uses: './'
with:
compose_profiles: ${{ matrix.compose_profiles }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}