Play with vite css #1557
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build master | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| if: github.repository == 'hexlet-codebattle/codebattle' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| MIX_ENV: test | |
| services: | |
| db: | |
| image: postgres:16-alpine | |
| ports: ["5432:5432"] | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| --name=pg_ci | |
| --mount type=tmpfs,destination=/var/lib/postgresql/data | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: "27.3" | |
| elixir-version: "1.18.4" | |
| - name: Cache Dependencies | |
| uses: actions/cache@v4 | |
| id: deps-cache | |
| with: | |
| path: | | |
| ./services/app/deps | |
| ./services/app/_build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix- | |
| - name: Get deps | |
| run: | | |
| mix local.hex --force | |
| mix local.rebar --force | |
| mix deps.get | |
| working-directory: ./services/app | |
| - name: Mix deps.compile | |
| run: mix compile --warnings-as-errors | |
| working-directory: ./services/app | |
| - name: Mix format | |
| run: mix format --check-formatted | |
| working-directory: ./services/app | |
| - name: Mix credo | |
| run: mix credo | |
| working-directory: ./services/app | |
| # --- pnpm setup & caching --- | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| cache-dependency-path: ./services/app/apps/codebattle/pnpm-lock.yaml | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Install pnpm dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: ./services/app/apps/codebattle | |
| - name: Eslint | |
| run: pnpm run lint | |
| working-directory: ./services/app/apps/codebattle | |
| - name: Run jest | |
| run: pnpm run test | |
| working-directory: ./services/app/apps/codebattle | |
| - name: Mix audit | |
| run: mix hex.audit | |
| working-directory: ./services/app | |
| - name: Setup db | |
| run: mix ecto.create && mix ecto.migrate | |
| working-directory: ./services/app | |
| - name: Mix tests | |
| run: make test | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./services/app/assp/codebattle/cover/excoveralls.json | |
| fail_ci_if_error: false | |
| - name: Install Podman | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y install podman | |
| - name: Login to Github Container Registry | |
| run: podman login ghcr.io -u vtm9 -p ${{ secrets.GH_REGISTRY_TOKEN }} | |
| - name: Build and push codebattle image | |
| run: | | |
| make GIT_HASH=${{ github.sha }} podman-build-codebattle | |
| make podman-push-codebattle | |
| - name: Build and push runner image | |
| run: | | |
| make podman-build-runner | |
| make podman-push-runner |