Skip to content

Commit

Permalink
Merge pull request #45 from codecov/use-cli
Browse files Browse the repository at this point in the history
feat: use the new CLI/wrapper
  • Loading branch information
thomasrockhu-codecov authored Oct 18, 2024
2 parents 3710b24 + 9992c84 commit dfec5a3
Show file tree
Hide file tree
Showing 8 changed files with 542 additions and 152 deletions.
2 changes: 0 additions & 2 deletions .bitrise.secrets.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.bitrise*
.bitrise.secrets.yml
*.py[oc]
.coverage
_tmp
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "src/scripts"]
path = src/scripts
url = https://github.com/codecov/wrapper
branch = main
100 changes: 50 additions & 50 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
---
format_version: "5"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- CI_OPTIONS: -Z
- LOCAL_OPTIONS: -Z -d
- OS: macos
- LOCAL_OPTIONS: -Z -d
- OS: macos
workflows:
test-ci:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
- script:
inputs:
- content: |-
pip3 install -r app/requirements.txt
pytest --cov app
- path::/Users/vagrant/git:
title: Step Test
run_if: true
is_skippable: false
inputs:
- CODECOV_TOKEN: $CODECOV_TOKEN
- OS: $OS
- other_options: $CI_OPTIONS
- script:
title: Step audit
inputs:
- content: |-
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
- script:
inputs:
- content: |-
pip3 install -r app/requirements.txt
python3 -m pytest ./app --cov app
python3 -m coverage xml
- path::/Users/vagrant/git:
title: Step Test
run_if: true
is_skippable: false
inputs:
- CC_TOKEN: $CODECOV_TOKEN
- CC_FAIL_ON_ERROR: true
- script:
title: Step audit
inputs:
- content: |-
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml
test-local:
steps:
- git-clone@8: {}
- script:
inputs:
- content: |-
pip3 install -r app/requirements.txt
pytest --cov app
- path::./:
title: Step Test
run_if: true
is_skippable: false
inputs:
- CODECOV_TOKEN: ${CODECOV_TOKEN}
- OS: $OS
- other_options: $LOCAL_OPTIONS
- git-clone@8: {}
- script:
inputs:
- content: |-
pip3 install -r app/requirements.txt
python3 -m pytest ./app --cov app
- path::./:
title: Step Test
run_if: true
is_skippable: false
inputs:
- CC_TOKEN: ${CODECOV_TOKEN}
- CC_FAIL_ON_ERROR: true
- CC_DRY_RUN: true
audit-this-step:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml
trigger_map:
- push_branch: main
workflow: test-ci
- pull_request_target_branch: main
workflow: test-ci
- push_branch: main
workflow: test-ci
- pull_request_target_branch: main
workflow: test-ci
4 changes: 4 additions & 0 deletions commit-hooks/pre-commit → hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

set -e

cp src/scripts/dist/codecov.sh ./step.sh
chmod u+x step.sh
git add step.sh

bitrise validate
bitrise run audit-this-step
bitrise run test-local
1 change: 1 addition & 0 deletions src/scripts
Submodule scripts added at 259151
Loading

0 comments on commit dfec5a3

Please sign in to comment.