Skip to content

chore(ci): upgrade to v5 #862

chore(ci): upgrade to v5

chore(ci): upgrade to v5 #862

Workflow file for this run

name: Github Actions Kotlin 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@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install requests
- name: Set up JDK 18
uses: actions/setup-java@v2
with:
java-version: '18'
distribution: 'adopt'
- name: Before Install
run: |
chmod +x gradlew
chmod +x gradle/wrapper/gradle-wrapper.jar
- name: Test and collect coverage
run: |
./gradlew build
./gradlew test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: Check coverage
run: python request.py
env:
API_KEY: ${{ secrets.API_KEY }}
CORRECT_COVERAGE: ${{ secrets.CORRECT_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