Skip to content

Commit

Permalink
Moved build lint test to ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartendeKruijf committed Mar 6, 2024
1 parent e4a04fd commit fa5536d
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 77 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/build.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Ci

on:
pull_request:
branches: [ master, development ]

jobs:
build:
name: Build binary
runs-on: ubuntu-latest
container:
image: golangci/golangci-lint:latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install swaggo
run: go install github.com/swaggo/swag/cmd/swag@latest

- name: Build with make
run: make build

lint:
name: Lint go code with golangci
runs-on: ubuntu-latest
container:
image: golangci/golangci-lint:latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Make repo safe
run: git config --global --add safe.directory /__w/SOARCA/SOARCA

- name: lint
run: |
ls -la
golangci-lint run --timeout 5m -v
shell: bash

test:
name: Run ci-tests
runs-on: ubuntu-latest
container:
image: golang:latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run tests
run: |
apt update
apt install openssh-server -y
useradd sshtest
echo "sshtest:pdKY77qNxpI5MAizirtjCVOcm0KFKIs" | chpasswd
service ssh start
make ci-test
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit fa5536d

Please sign in to comment.