Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use the new CLI/wrapper #45

Merged
merged 6 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading