Skip to content

Commit

Permalink
make build for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ainghazal committed Apr 21, 2024
1 parent 24cec19 commit 1784008
Showing 1 changed file with 34 additions and 11 deletions.
45 changes: 34 additions & 11 deletions .github/workflows/test.yml → .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test, lint and gosec
name: cicd

on:
push:
Expand All @@ -8,17 +8,11 @@ on:
branches:
- 'no-masters'

permissions:
contents: write
packages: write

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Run short tests
run: go test -cover ./...

lint:
runs-on: ubuntu-latest
Expand All @@ -40,3 +34,32 @@ jobs:
uses: securego/gosec@master
with:
args: '-no-fail ./...'

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Run short tests
run: go test -cover ./...

build-linux-amd64:
runs-on: ubuntu-latest
#needs: [test, lint, gosec]
steps:
- uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Install dependencies
run: go get ./...
- name: build linux-amd64
run: go build ./cmd/tt-server
- name: upload binary artifact
uses: actions/upload-artifact@v4
with:
path: tt-server

0 comments on commit 1784008

Please sign in to comment.