1.3.0: ci: add test for the code #1
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
205902205f
commit
3f0a638266
1 changed files with 42 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
name: Test Pipeline
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
|
@ -18,3 +20,42 @@ jobs:
|
|||
uses: https://github.com/golangci/golangci-lint-action@v8
|
||||
with:
|
||||
version: v2.1
|
||||
ci-test:
|
||||
runs-on: raw
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue