mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Add Github Actions CI script
This commit is contained in:
48
.github/workflows/ci.yml
vendored
Normal file
48
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.12
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Build
|
||||
run: |
|
||||
make build
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.12
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Test
|
||||
run: |
|
||||
make test
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.12
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Lint
|
||||
run: |
|
||||
make lint
|
@ -2,6 +2,7 @@
|
||||
|
||||
![Podsync](docs/img/logo.png)
|
||||
|
||||
![](https://github.com/mxpv/podsync/workflows/CI/badge.svg)
|
||||
[![Build Status](https://travis-ci.com/mxpv/podsync.svg?branch=master)](https://travis-ci.com/mxpv/podsync)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/mxpv/podsync)](https://goreportcard.com/report/github.com/mxpv/podsync)
|
||||
[![Patreon](https://img.shields.io/badge/support-patreon-E6461A.svg)](https://www.patreon.com/podsync)
|
||||
|
@ -104,7 +104,7 @@ func (u *Updater) Update(ctx context.Context, feedConfig *config.Feed) error {
|
||||
// Record file size
|
||||
if size, err := u.fileSize(episodePath); err != nil {
|
||||
return errors.Wrap(err, "failed to get episode file size")
|
||||
} else {
|
||||
} else { //nolint
|
||||
logger.Debugf("file size %d", size)
|
||||
sizes[episode.ID] = size
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ func (dl YoutubeDl) Download(ctx context.Context, feedConfig *config.Feed, url s
|
||||
destPath,
|
||||
url,
|
||||
)
|
||||
} else {
|
||||
} else { //nolint
|
||||
// Low quality audio (encoded to mp3)
|
||||
return dl.exec(ctx,
|
||||
"--extract-audio",
|
||||
@ -79,7 +79,7 @@ func (dl YoutubeDl) Download(ctx context.Context, feedConfig *config.Feed, url s
|
||||
destPath,
|
||||
url,
|
||||
)
|
||||
} else {
|
||||
} else { //nolint
|
||||
// Low quality
|
||||
return dl.exec(ctx,
|
||||
"--format",
|
||||
|
Reference in New Issue
Block a user