Skip to content

Merge pull request #84 from SUNET/dependabot/github_actions/actions-2… #150

Merge pull request #84 from SUNET/dependabot/github_actions/actions-2…

Merge pull request #84 from SUNET/dependabot/github_actions/actions-2… #150

Workflow file for this run

name: Build and run tests
permissions: {}
on:
push:
branches:
- main
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
# will assign a random free host port
- 5432/tcp
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Setup rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
with:
components: rustfmt, clippy
toolchain: stable
- name: Install uv
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
- name: actions-setup-redis
uses: shogo82148/[email protected]
with:
auto-start: false
distribution: "valkey"
redis-version: "7.2"
- name: Install just
uses: extractions/setup-just@v3
- name: Build TA appliation
run: cargo build
- name: Run tests for inmor TA
run: just test-ta
- name: Run tests for inmor Admin API
run: just test-admin
env:
# use localhost for the host here because we are running the job on the VM.
# If we were running the job on in a container this would be postgres
DB_HOST: localhost
DB_PORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port
REDIS_LOCATION: "redis://localhost:6088/0"