diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 8eca0285..725334a7 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -8,71 +8,18 @@ on: env: DOCKER_BUILDKIT: 1 DOCKER_TLS_CERTDIR: "" - MIX_ENV: test concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - test-and-build: + build: runs-on: ubuntu-22.04 - env: - DATABASE_URL: postgresql://postgres:postgres@postgres:5432/towerops_test - ERL_AFLAGS: "-kernel shell_history enabled" - services: - postgres: - image: timescale/timescaledb:latest-pg17 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: towerops_test - options: >- - --health-cmd pg_isready - --health-interval 3s - --health-timeout 2s - --health-retries 10 - steps: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Elixir - uses: https://github.com/erlef/setup-beam@v1 - with: - otp-version: '28.3' - elixir-version: '1.19.5' - version-type: strict - - - name: Restore caches - uses: actions/cache@v4 - with: - path: | - ~/.hex - ~/.mix - deps - _build - native/towerops_native/target - ~/.cargo/registry - ~/.cargo/git - key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}-${{ hashFiles('lib/**/*.ex') }}-${{ hashFiles('native/**/*.rs') }}-elixir-1.19.5-otp-28.3 - restore-keys: | - ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}- - ${{ runner.os }}-mix- - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends libsnmp-dev snmp-mibs-downloader postgresql-client - - - name: Install Elixir dependencies - run: mix deps.get --only test - - - name: Compile and test - run: | - mix compile --warnings-as-errors - mix test --warnings-as-errors --max-cases 3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: