mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
test: skip building a temporary binary for integration tests
This commit is contained in:
parent
9e4248c7c1
commit
9e722839b5
5 changed files with 6 additions and 10 deletions
2
.github/workflows/build_binaries.yml
vendored
2
.github/workflows/build_binaries.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
- name: Set up Golang
|
- name: Set up Golang
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.25.x"
|
go-version: stable
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Compile binaries
|
- name: Compile binaries
|
||||||
env:
|
env:
|
||||||
|
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -37,7 +37,7 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.25.x"
|
go-version: stable
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v3
|
||||||
|
|
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.25.x"
|
go-version: stable
|
||||||
- uses: golangci/golangci-lint-action@v8
|
- uses: golangci/golangci-lint-action@v8
|
||||||
with:
|
with:
|
||||||
args: >
|
args: >
|
||||||
|
|
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
|
@ -15,14 +15,13 @@ jobs:
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
go-version: ["1.25.x"]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- 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: stable
|
||||||
- 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
|
||||||
|
@ -49,12 +48,11 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.25.x"
|
go-version: stable
|
||||||
- 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
|
||||||
run: make integration-test
|
run: make integration-test
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
PGHOST: 127.0.0.1
|
PGHOST: 127.0.0.1
|
||||||
PGPASSWORD: postgres
|
PGPASSWORD: postgres
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -106,7 +106,6 @@ lint:
|
||||||
integration-test:
|
integration-test:
|
||||||
psql -U postgres -c 'drop database if exists miniflux_test;'
|
psql -U postgres -c 'drop database if exists miniflux_test;'
|
||||||
psql -U postgres -c 'create database miniflux_test;'
|
psql -U postgres -c 'create database miniflux_test;'
|
||||||
go build -o miniflux-test main.go
|
|
||||||
|
|
||||||
DATABASE_URL=$(DB_URL) \
|
DATABASE_URL=$(DB_URL) \
|
||||||
ADMIN_USERNAME=admin \
|
ADMIN_USERNAME=admin \
|
||||||
|
@ -114,7 +113,7 @@ integration-test:
|
||||||
CREATE_ADMIN=1 \
|
CREATE_ADMIN=1 \
|
||||||
RUN_MIGRATIONS=1 \
|
RUN_MIGRATIONS=1 \
|
||||||
LOG_LEVEL=debug \
|
LOG_LEVEL=debug \
|
||||||
./miniflux-test >/tmp/miniflux.log 2>&1 & echo "$$!" > "/tmp/miniflux.pid"
|
go run main.go >/tmp/miniflux.log 2>&1 & echo "$$!" > "/tmp/miniflux.pid"
|
||||||
|
|
||||||
while ! nc -z localhost 8080; do sleep 1; done
|
while ! nc -z localhost 8080; do sleep 1; done
|
||||||
|
|
||||||
|
@ -126,7 +125,6 @@ integration-test:
|
||||||
clean-integration-test:
|
clean-integration-test:
|
||||||
@ kill -9 `cat /tmp/miniflux.pid`
|
@ kill -9 `cat /tmp/miniflux.pid`
|
||||||
@ rm -f /tmp/miniflux.pid /tmp/miniflux.log
|
@ rm -f /tmp/miniflux.pid /tmp/miniflux.log
|
||||||
@ rm miniflux-test
|
|
||||||
@ psql -U postgres -c 'drop database if exists miniflux_test;'
|
@ psql -U postgres -c 'drop database if exists miniflux_test;'
|
||||||
|
|
||||||
docker-image:
|
docker-image:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue