mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
ci: checkout before installing Go
Obtaining the code before deploying go allows better caching, as the go.sum file becomes available. See https://github.com/actions/setup-go/issues/281
This commit is contained in:
parent
195b75d185
commit
f3989cdb2f
2 changed files with 7 additions and 7 deletions
4
.github/workflows/build_binaries.yml
vendored
4
.github/workflows/build_binaries.yml
vendored
|
@ -9,13 +9,13 @@ jobs:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Set up Golang
|
- name: Set up Golang
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.23.x"
|
go-version: "1.23.x"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Compile binaries
|
- name: Compile binaries
|
||||||
env:
|
env:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
|
10
.github/workflows/tests.yml
vendored
10
.github/workflows/tests.yml
vendored
|
@ -17,18 +17,18 @@ jobs:
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
go-version: ["1.23.x"]
|
go-version: ["1.23.x"]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Run unit tests with coverage and race conditions checking
|
- name: Run unit tests with coverage and race conditions checking
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: make test
|
run: make test
|
||||||
- name: Run unit tests without coverage and race conditions checking
|
- name: Run unit tests without coverage and race conditions checking
|
||||||
if: matrix.os != 'ubuntu-latest'
|
if: matrix.os != 'ubuntu-latest'
|
||||||
run: go test -count=1 ./...
|
run: go test ./...
|
||||||
|
|
||||||
integration-tests:
|
integration-tests:
|
||||||
name: Integration Tests
|
name: Integration Tests
|
||||||
|
@ -44,12 +44,12 @@ jobs:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.23.x"
|
go-version: "1.23.x"
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Install Postgres client
|
- name: Install Postgres client
|
||||||
run: sudo apt update && sudo apt install -y postgresql-client
|
run: sudo apt update && sudo apt install -y postgresql-client
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue