aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-08-05 10:20:38 +0100
committerGitHub <noreply@github.com>2023-08-05 10:20:38 +0100
commite6f68d2e4cd1bc4447126816c7c27e1fc2098e30 (patch)
tree15c5e333b93641f9eadcb4bf4b34c338135f7a23 /.github
parent5882d60fb7ccd4cfc0fe69286aa96e198c9d1eb0 (diff)
parent4ec6b3f4fa9cdfe8f10d0953ac7d398d01a90f17 (diff)
downloadgo-git-e6f68d2e4cd1bc4447126816c7c27e1fc2098e30.tar.gz
Merge branch 'master' into jc/commit-ammend
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/codeql.yml44
-rw-r--r--.github/workflows/git.yml19
-rw-r--r--.github/workflows/test.yml23
3 files changed, 65 insertions, 21 deletions
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..fbb867c
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,44 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+ schedule:
+ - cron: '00 5 * * 1'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'go' ]
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
+ with:
+ languages: ${{ matrix.language }}
+ # xref: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+ # xref: https://codeql.github.com/codeql-query-help/go/
+ queries: security-and-quality
+
+ - name: Manual Build
+ run: go build ./...
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/git.yml b/.github/workflows/git.yml
index bbccaa3..60cfa12 100644
--- a/.github/workflows/git.yml
+++ b/.github/workflows/git.yml
@@ -1,5 +1,8 @@
on: [push, pull_request]
name: Git Compatibility
+permissions:
+ contents: read
+
jobs:
test:
strategy:
@@ -14,15 +17,15 @@ jobs:
steps:
- name: Install Go
- uses: actions/setup-go@v1
+ uses: actions/setup-go@v3
with:
- go-version: 1.14.x
+ go-version: 1.20.x
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install build dependencies
- run: sudo apt-get install gettext
+ run: sudo apt-get update && sudo apt-get install gettext libcurl4-openssl-dev
- name: Git Build
run: make build-git
@@ -38,3 +41,11 @@ jobs:
- name: Test
run: make test-coverage
+
+ - name: Test SHA256
+ run: make test-sha256
+
+ - name: Build go-git with CGO disabled
+ run: go build ./...
+ env:
+ CGO_ENABLED: 0
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1644dcf..ce5872d 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,22 +1,25 @@
on: [push, pull_request]
name: Test
+permissions:
+ contents: read
+
jobs:
version-matrix:
strategy:
fail-fast: false
matrix:
- go-version: [1.15.x, 1.16.x]
+ go-version: [1.19.x, 1.20.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
- uses: actions/setup-go@v1
+ uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Configure known hosts
if: matrix.platform != 'ubuntu-latest'
@@ -31,17 +34,3 @@ jobs:
- name: Test
run: make test-coverage
-
- - name: Convert coverage to lcov
- if: matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.14.x'
- uses: jandelgado/gcov2lcov-action@v1.0.0
- with:
- infile: coverage.out
- outfile: coverage.lcov
-
- - name: Coveralls
- if: matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.14.x'
- uses: coverallsapp/github-action@master
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- path-to-lcov: coverage.lcov