mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
rehaul action yml
This commit is contained in:
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@@ -1,3 +1,16 @@
|
|||||||
action "action a" {
|
name: Codecov action workflow
|
||||||
uses = "./codecov-action/"
|
on: [push]
|
||||||
}
|
jobs:
|
||||||
|
run:
|
||||||
|
name: Run
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest,macos-latest]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Set Node.js 10.x
|
||||||
|
uses: actions/setup-node@master
|
||||||
|
with:
|
||||||
|
version: 10.x
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
FROM alpine:3.10.1
|
|
||||||
|
|
||||||
LABEL "com.github.actions.name"="Codecov"
|
|
||||||
LABEL "com.github.actions.description"="Upload coverage reports to codecov"
|
|
||||||
LABEL "com.github.actions.icon"="umbrella"
|
|
||||||
LABEL "com.github.actions.color"="red"
|
|
||||||
|
|
||||||
LABEL "repository"="https://github.com/ibrahim0814/github-actions-test.git"
|
|
||||||
LABEL "homepage"="https://www.codecov.io"
|
|
||||||
LABEL "maintainer"="Ib <ibrahim@codecov.io>"
|
|
||||||
|
|
||||||
RUN apk add --no-cache curl bash git
|
|
||||||
|
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
|
||||||
RUN chmod +x /entrypoint.sh
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
@@ -1,14 +1,28 @@
|
|||||||
name: 'Codecov'
|
name: 'Codecov Github Action'
|
||||||
description: 'Upload coverage to Codecov'
|
description: 'Github action that uploads coverage reports for this repository to codecov.io'
|
||||||
# inputs:
|
author: 'Ib @ Codecov'
|
||||||
# who-to-greet: # id of input
|
inputs:
|
||||||
# description: 'Who to greet'
|
conf:
|
||||||
# required: true
|
description: 'Used to specify the location of the .codecov.yml config file'
|
||||||
# default: 'World'
|
default: '.codecov.yml'
|
||||||
# outputs:
|
file:
|
||||||
# time: # id of output
|
description: 'Path to the code coverage data file to upload'
|
||||||
# description: 'The time we did the greeting'
|
default: ''
|
||||||
|
flags:
|
||||||
|
description: 'Flag the upload to group coverage metrics (e.g. unittests | integration | ui,chrome)'
|
||||||
|
default: ''
|
||||||
|
token:
|
||||||
|
description: 'Set the private repository token (defaults to environment variable CODECOV_TOKEN)'
|
||||||
|
default: ${{secrets.CODECOV_TOKEN}}
|
||||||
branding:
|
branding:
|
||||||
color: 'red' # optional, decorates the entry in the GitHub Marketplace
|
color: 'red'
|
||||||
icon: 'umbrella'
|
icon: 'umbrella'
|
||||||
runs: './entrypoint.js'
|
runs:
|
||||||
|
using: 'node12'
|
||||||
|
main: |
|
||||||
|
curl -s https://codecov.io/bash | bash -s -- \
|
||||||
|
-f ${{inputs.file}} \
|
||||||
|
-t ${{inputs.token}} \
|
||||||
|
-y ${{inputs.conf}} \
|
||||||
|
-F ${{inputs.flags}} \
|
||||||
|
-Z || echo 'Codecov upload failed'
|
||||||
Reference in New Issue
Block a user