GoAnime CI #544
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
#name: GoAnime CI | |
# | |
#on: | |
# push: | |
# branches: [ main, dev ] | |
# pull_request: | |
# branches: [ main, dev ] | |
# schedule: | |
# - cron: '0 0 * * *' | |
# | |
#jobs: | |
# build: | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# matrix: | |
# os: [ ubuntu-latest, windows-latest, macOS-latest ] # Added macOS target operating systems | |
# go-version: [ '1.22.0' ] # You can add more versions to test against multiple Go versions | |
# steps: | |
# - name: Set up Go | |
# uses: actions/setup-go@v3 | |
# with: | |
# go-version: ${{ matrix.go-version }} | |
# | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# | |
# - name: Install dependencies (Linux) | |
# if: runner.os == 'Linux' | |
# run: | | |
# sudo apt update | |
# sudo apt install -y mpv yt-dlp | |
# | |
# - name: Install dependencies (Windows) | |
# if: runner.os == 'Windows' | |
# run: | | |
# choco install mpv | |
# choco install yt-dlp | |
# | |
# - name: Install dependencies (macOS) | |
# if: runner.os == 'macOS' | |
# run: | | |
# brew install mpv yt-dlp | |
# | |
# - name: Get dependencies | |
# run: go get -v -t -d ./... | |
# | |
# - name: Run tests | |
# run: go test -v ./... | |
name: GoAnime CI | |
on: | |
push: | |
branches: [ main, dev ] | |
pull_request: | |
branches: [ main, dev ] | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macOS-latest ] # Added macOS target operating systems | |
go-version: [ '1.22.0' ] # You can add more versions to test against multiple Go versions | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update | |
sudo apt install -y mpv yt-dlp | |
- name: Install dependencies (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
choco install mpv | |
choco install yt-dlp | |
- name: Install dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install mpv yt-dlp | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Run tests | |
run: go test -v ./... | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# test | |