users/.forgejo/workflows/test.yml
GnomeZworc e80bf3abc3
Some checks failed
Test Pipeline / lint (pull_request) Failing after 2m26s
Test Pipeline / ci-test (pull_request) Failing after 2m59s
1.3.0: ci: rollback change image #1
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-09-26 02:13:19 +02:00

63 lines
No EOL
1.8 KiB
YAML

name: Test Pipeline
on:
pull_request:
types: [opened, synchronize]
jobs:
lint:
runs-on: raw
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: golangci-lint
uses: https://github.com/golangci/golangci-lint-action@v8
with:
version: v2.1
ci-test:
runs-on: raw
container:
options: --privileged -v /var/run/docker.sock:/var/run/docker.sock
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install docker-cli
run: |
apt-get update
apt-get install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install -y docker-ce-cli
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
run: |
docker build --pull -t users-release --target release .
- name: Run Test
run: |
bash -ex ./scripts/prepar_test.sh
. ./config/test.src
go test -v ./cmd/
go install gotest.tools/gotestsum@latest
gotestsum --junitfile report.xml --format testname