From db96845250ecba0ca1ce95d612cc797e4ce80d5d Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 7 Mar 2026 12:45:19 -0600 Subject: [PATCH] refactor: remove test.yaml workflow Simplified CI/CD to two workflows: - staging.yaml: Deploys to Dokku on main push (no tests) - production.yaml: Full test suite + deploy on production push Main branch deploys immediately to staging for fast iteration. Production branch has comprehensive test gates before deployment. --- .forgejo/workflows/test.yaml | 84 ------------------------------------ 1 file changed, 84 deletions(-) delete mode 100644 .forgejo/workflows/test.yaml diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml deleted file mode 100644 index 32f4e406..00000000 --- a/.forgejo/workflows/test.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: Tests - -on: - push: - branches: - - main - pull_request: - branches: - - main - - production - -env: - MIX_ENV: test - -jobs: - test-exunit: - name: ExUnit Tests - runs-on: ubuntu-latest - - services: - postgres: - image: timescale/timescaledb:latest-pg16 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: towerops_test - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - steps: - - name: Checkout code - uses: https://github.com/actions/checkout@v4 - - - name: Set up Elixir - uses: https://github.com/erlef/setup-beam@v1 - with: - version-type: strict - elixir-version: '1.18.1' - otp-version: '27.2' - - - name: Cache deps - uses: https://github.com/actions/cache@v4 - with: - path: deps - key: ${{ runner.os }}-deps-${{ hashFiles('mix.lock') }} - restore-keys: ${{ runner.os }}-deps- - - - name: Cache _build - uses: https://github.com/actions/cache@v4 - with: - path: _build - key: ${{ runner.os }}-build-${{ hashFiles('lib/**/*.ex') }}-${{ hashFiles('mix.lock') }} - restore-keys: ${{ runner.os }}-build- - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y openssl libssl1.1 libssl-dev libsnmp-dev snmp-mibs-downloader postgresql-client - - - name: Install dependencies - run: mix deps.get - - - name: Check formatting - run: mix format --check-formatted - - - name: Compile (warnings as errors) - run: mix compile --warnings-as-errors - - - name: Run tests with coverage - run: mix test --cover - - - name: Run Credo - run: mix credo --strict - - - name: Upload coverage reports - if: always() - uses: https://github.com/actions/upload-artifact@v4 - with: - name: coverage-report - path: cover/ - retention-days: 7