Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/feedfetcher-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: FeedFetcher Tests

on:
pull_request:
paths:
- 'feedfetcher/**'
- '.github/workflows/feedfetcher-tests.yml'
push:
branches:
- main
paths:
- 'feedfetcher/**'

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Download dependencies
working-directory: ./feedfetcher
run: go mod download

- name: Run tests
working-directory: ./feedfetcher
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./feedfetcher/coverage.txt
flags: feedfetcher

build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build binary
working-directory: ./feedfetcher
run: make build

- name: Verify binary
working-directory: ./feedfetcher
run: |
./feedfetcher --help || true
file feedfetcher

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: ./feedfetcher
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# PR descriptions (for local reference only)
PR_DESCRIPTION.md

# OS
.DS_Store
Loading
Loading