From 2fadb42c0eecc7f0254406b1005cf5fa1eea53cc Mon Sep 17 00:00:00 2001 From: fatmaebrahim Date: Sun, 22 Sep 2024 02:46:15 +0300 Subject: [PATCH] chore: added test.yml to github workflows --- .github/workflows/test.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0c82ed1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,47 @@ +name: gotest +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + + - name: Build + run: go build -o bin/ginserver ./cmd/ginmain/main.go + run: go build -o bin/httpserver ./cmd/httpmain/main.go + + golangci: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + + - name: Format + run: go fmt ./... + + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.60 + + testing: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + + - name: Test + run: go test ./test \ No newline at end of file