Skip to content

Commit

Permalink
feat: migrate to wrapper and CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed Oct 17, 2024
1 parent 3710b24 commit 2253d2f
Show file tree
Hide file tree
Showing 7 changed files with 543 additions and 149 deletions.
1 change: 1 addition & 0 deletions .bitrise.secrets.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
envs:
- CODECOV_TOKEN: fake
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
101 changes: 51 additions & 50 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
---
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
- CI_OPTIONS: -Z
- 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
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
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
pytest --cov app
- path::./:
title: Step Test
run_if: true
is_skippable: false
inputs:
- CODECOV_TOKEN: ${CODECOV_TOKEN}
- OS: $OS
- other_options: $LOCAL_OPTIONS
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 2253d2f

Please sign in to comment.