diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bf13527 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: Build and Test + +on: + push: + branches: + - master + pull_request: +permissions: + contents: read + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - name: Lint + run: make lint + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - name: Test + run: make test + build: + name: Build + runs-on: ubuntu-latest + needs: [lint,test] + steps: + - name: Checkout code + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - name: Build + run: make build + - name: Make Clean + run: make clean \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c52cf3..e9c77fc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,37 +1,37 @@ -name: Test +# name: Test -on: - push: - branches: - - master - pull_request: +# on: +# push: +# branches: +# - master +# pull_request: -permissions: - contents: read - checks: write - pull-requests: write +# permissions: +# contents: read +# checks: write +# pull-requests: write -jobs: - test: - runs-on: ubuntu-latest +# jobs: +# test: +# runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 +# steps: +# - name: Checkout code +# uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: 1.20.7 +# - name: Install Go +# uses: actions/setup-go@v4 +# with: +# go-version: 1.20.7 - - name: Run tests - run: | - go install gotest.tools/gotestsum@latest - mkdir -p test-reports - gotestsum --junitfile test-reports/unit-tests.xml +# - name: Run tests +# run: | +# go install gotest.tools/gotestsum@latest +# mkdir -p test-reports +# gotestsum --junitfile test-reports/unit-tests.xml - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - if: always() - with: - files: test-reports/unit-tests.xml +# - name: Publish Unit Test Results +# uses: EnricoMi/publish-unit-test-result-action@v1 +# if: always() +# with: +# files: test-reports/unit-tests.xml