mirror of
https://github.com/go-sigma/sigma.git
synced 2026-10-28 19:34:33 +08:00
Run the self-hosted rs3 service instead of Minio in test.yml and swap the local helper script, Makefile helm values, and AGENTS.md notes accordingly. Fix the E2E workflow (refs #426): it only triggered on the `main` branch, which does not exist in this repository, so the job never ran. Trigger it on `dev` for both push and pull_request like test.yml, build the image via the consolidated `make docker-build`, bump the checkout/setup-go actions, drop the hosted-toolcache cleanup, and refresh the E2E tooling to k6 v2.3.0 and skopeo v1.24.1. Repair the image startup path as well: start nginx with an explicit /etc/nginx/nginx.conf and a /dev/stderr error log so the non-root user does not touch the compiled-in log path, create /etc/sigma with mode 0755 before copying config.yaml (COPY --chmod made the directory non-traversable), and disable redis in the shipped default config since cache, locker and work queue are inmemory.
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json
|
|
name: E2E CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
|
|
jobs:
|
|
e2e-test:
|
|
name: e2e-test
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout branch
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Setup golang
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version: "1.27"
|
|
cache: false
|
|
- name: Build latest skopeo
|
|
run: |
|
|
git clone --depth 1 --branch v1.24.1 https://github.com/containers/skopeo.git
|
|
cd skopeo
|
|
DISABLE_CGO=1 make bin/skopeo
|
|
sudo cp ./bin/skopeo /usr/bin/skopeo
|
|
cd ..
|
|
rm -rf skopeo
|
|
skopeo --version
|
|
- name: Build
|
|
run: |
|
|
IP=`hostname -I | awk '{print $1}'`
|
|
echo '{"insecure-registries" : ["'$IP':3000"]}' | sudo tee /etc/docker/daemon.json
|
|
sudo service docker restart
|
|
echo $DOCKER_HOST
|
|
|
|
docker buildx create --use
|
|
make docker-build REPOSITORY=sigma TAG=latest DOCKER_PLATFORMS=linux/amd64
|
|
- name: Run sigma
|
|
run: |
|
|
docker run --name sigma -v /var/run/docker.sock:/var/run/docker.sock -d -p 3000:3000 sigma:latest
|
|
sleep 5
|
|
docker logs sigma
|
|
- name: Test push and e2e with k6
|
|
run: |
|
|
./e2e/push.sh
|
|
curl https://github.com/grafana/k6/releases/download/v2.3.0/k6-v2.3.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1
|
|
./k6 run e2e/sc.js
|
|
docker logs sigma
|