Skip to content

chore(ci): upgrade to v4 #882

chore(ci): upgrade to v4

chore(ci): upgrade to v4 #882

Workflow file for this run

name: Github Actions Go Standard
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-and-upstream:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.STANDARDS_TOKEN }}
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Before Install
run: pip install requests
- name: Run Tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic
env:
GO111MODULE: 'auto'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: Check coverage
run: python request.py
env:
API_KEY: ${{ secrets.API_KEY }}
EXPECTED_COVERAGE: ${{ secrets.EXPECTED_COVERAGE }}
- name: Upstream to Standards
env:
GH_TOKEN: ${{ secrets.STANDARDS_TOKEN }}
COVERAGE_SOURCE_FILE: ${{ secrets.COVERAGE_SOURCE_FILE }}
if: ${{ github.event_name == 'push'}}
run: |
wget --header "Authorization: token ${GH_TOKEN}" \
--header "Accept: application/vnd.github.v3.raw" \
https://api.github.com/repos/codecov/standards/contents/upstream.sh
bash upstream.sh