Skip to content

Estimated catchup time & minor fixes #198

Estimated catchup time & minor fixes

Estimated catchup time & minor fixes #198

Workflow file for this run

name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Download code coverage report
uses: dawidd6/action-download-artifact@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: coverage.yml
workflow_conclusion: success
name: test-coverage.info
- name: Install cloudflared
run: ./.github/scripts/install-cloudflared.sh
- name: Load SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.VPS_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.VPS_SSH_KNOWN_HOSTS }}
- name: Install dependencies
run: |
bun install --frozen-lockfile
- name: Tunnel to VPS
env:
TUNNEL_SERVICE_TOKEN_ID: ${{ secrets.CF_GHA_CLIENT_ID }}
TUNNEL_SERVICE_TOKEN_SECRET: ${{ secrets.CF_GHA_CLIENT_SECRET }}
run: |
ssh -N -L 5432:localhost:5432 -L 8123:localhost:8123 -L 9090:localhost:9090 -o ProxyCommand="cloudflared access ssh --hostname %h" root@ssh.raidhub.io &
- name: Run Tests
env:
CLIENT_SECRET: "secret-token"
ADMIN_CLIENT_SECRET: "another-secret-token"
JWT_SECRET: "jwt-secret"
POSTGRES_USER: readonly
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_READONLY_PASSWORD }}
CLICKHOUSE_USER: ${{ secrets.CLICKHOUSE_READONLY_USER }}
CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_READONLY_PASSWORD }}
BUNGIE_API_KEY: ${{ secrets.BUNGIE_API_KEY }}
run: bun test --coverage --bail=5 --timeout=20000
# Compares two code coverage files and generates report as a comment
- name: Generate Code Coverage report
id: code-coverage
uses: barecheck/code-coverage-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
base-lcov-file: "./lcov.info"
lcov-file: "./coverage/lcov.info"
minimum-ratio: 0.05 # Fails Github action once code coverage is decreasing
send-summary-comment: true
show-annotations: "warning" # Possible options warning|error