Skip to content

Commit

Permalink
Merge pull request #4 from codecov/fix-update-uploader
Browse files Browse the repository at this point in the history
chore: update to new uploader
  • Loading branch information
thomasrockhu-codecov authored Oct 17, 2022
2 parents d1f5365 + 7bf4676 commit e59ffc2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Workflow for example-clojure
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
check-latest: true
- name: Run tests
run: lein test
- name: Cloverage
run: CLOVERAGE_VERSION=1.1.1 lein cloverage --codecov
- name: Upload to Codecov (Action)
uses: codecov/codecov-action@v2
with:
file: target/coverage/codecov.json
- name: Upload to Codecov (Uploader)
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -f target/coverage/codecov.json
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# [Codecov][1] Clojure example

[![Build Status](https://travis-ci.org/codecov/example-clojure.svg?branch=master)](https://travis-ci.org/codecov/example-clojure)
[![Build Status](https://github.com/codecov/example-clojure/actions/workflows/ci.yml/badge.svg)]
[![codecov.io](https://codecov.io/github/codecov/example-clojure/coverage.svg?branch=master)](https://codecov.io/github/codecov/example-clojure?branch=master)

## Guide
### Travis Setup
Add to your `.travis.yml` file.
### GitHub Actions Step
Add to your workflows file.
```yml
language: clojure

after_success:
- CLOVERAGE_VERSION=1.0.7-SNAPSHOT lein cloverage --codecov
- bash <(curl -s https://codecov.io/bash)
- name: Upload to Codecov (Action)
uses: codecov/codecov-action@v2
with:
token: {{ token }}
```
or
```yml
- name: Upload to Codecov (Uploader)
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t {{ token }}
```
### Producing Coverage Reports
> Add to your `project.clj`
Expand Down

0 comments on commit e59ffc2

Please sign in to comment.