This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
📡 #247
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: 📡 | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/ci-go.yml' | |
- '**.go' | |
- 'go.*' | |
pull_request: | |
types: | |
- labeled | |
schedule: | |
# Every 10:42 JST | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
- cron: '42 1 * * *' | |
workflow_dispatch: | |
jobs: | |
test-actual-api: | |
# This test actually send request to Google API, so prevent frequently triggers with the labeled or not | |
if: >- | |
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'apitest')) || | |
(github.event_name != 'pull_request') | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache-dependency-path: 'go.sum' | |
- run: go test -count=1 -tags=apitest ./... |