mirror of
https://github.com/miniflux/v2.git
synced 2024-08-20 11:23:23 +02:00
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: Tests
|
|
permissions: read-all
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Unit Tests
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
max-parallel: 4
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
go-version: ["1.21"]
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Run unit tests
|
|
run: make test
|
|
|
|
integration-tests:
|
|
name: Integration Tests
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:9.5
|
|
env:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: postgres
|
|
ports:
|
|
- 5432:5432
|
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.21"
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Install Postgres client
|
|
run: sudo apt update && sudo apt install -y postgresql-client
|
|
- name: Run integration tests
|
|
run: make integration-test
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PGHOST: 127.0.0.1
|
|
PGPASSWORD: postgres
|