Files
RuvdsTest/.gitea/workflows/ci-cd.yml
danamir 0a1407719e
Some checks failed
CI/CD / build-test-deploy (pull_request) Failing after 53s
Install Node.js before Checkout in the CI/CD workflow
Host-mode jobs execute directly on the bare runner container rather
than a per-job container, and actions/checkout is a JS action — it
needs `node` on PATH to run at all, which the runner image doesn't
ship. Failed every run with "Cannot find: node in PATH" before any
other step got a chance to install anything.
2026-08-09 01:00:12 +03:00

56 lines
2.0 KiB
YAML

name: CI/CD
on:
push:
branches: [master]
pull_request:
branches: [master]
# Pinned so every run targets the same project regardless of the runner's
# checkout path — otherwise `docker compose` would derive the project name
# from the checkout directory, potentially spinning up a second stack and
# losing the `pgdata` volume instead of updating the running one.
env:
COMPOSE_PROJECT_NAME: ruvdstests
jobs:
build-test-deploy:
runs-on: host
steps:
# `runs-on: host` runs every step directly on the bare runner
# container instead of spinning up a fresh container per job, and
# `actions/checkout` below is a JS action — it needs a `node` binary
# on PATH to run at all, which this image doesn't ship. Has to come
# before Checkout, since Checkout itself is what fails without it.
- name: Install Node.js
shell: bash
run: apk add --no-cache nodejs
- name: Checkout
uses: https://github.com/actions/checkout@v4
# The runner image ships bare (no Docker CLI, no .NET) — it only has
# the host's Docker *socket* mounted (DooD), so both are installed
# fresh each run rather than baking a custom runner image.
- name: Install Docker CLI and .NET SDK
shell: bash
run: |
apk add --no-cache docker-cli docker-cli-compose bash curl \
icu-libs krb5-libs libgcc libintl libssl3 libstdc++ zlib ca-certificates
curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
bash dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet
ln -sf /usr/share/dotnet/dotnet /usr/local/bin/dotnet
- name: Run Domain unit tests
shell: bash
run: dotnet test tests/Domain.Tests/Domain.Tests.fsproj -c Release
- name: Build images
shell: bash
run: docker compose build
- name: Deploy (master only)
if: github.ref == 'refs/heads/master'
shell: bash
run: docker compose up -d