Files
mxpv-podsync/.github/workflows/ci.yml
T
Maksym Pavlenko 81d3af5fa1 Merge pull request #251 from mxpv/dependabot/github_actions/actions/upload-artifact-2.3.1
Bump actions/upload-artifact from 1 to 2.3.1
2021-12-31 12:56:40 +02:00

73 lines
1.5 KiB
YAML

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: actions/[email protected]
- run: make build
- uses: actions/[email protected]
with:
name: podsync-${{ matrix.os }}
path: bin/
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: actions/[email protected]
- env:
VIMEO_TEST_API_KEY: ${{ secrets.VIMEO_ACCESS_TOKEN }}
YOUTUBE_TEST_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
run: make test
checks:
name: Checks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: actions/[email protected]
- name: Go mod
env:
DIFF_PATH: "go.mod go.sum"
run: |
go mod tidy
DIFF=$(git status --porcelain -- $DIFF_PATH)
if [ "$DIFF" ]; then
echo
echo "These files were modified:"
echo
echo "$DIFF"
echo
exit 1
fi
- run: make lint