Skip to content

Commit

Permalink
chore(passport): use latest codecov cli version
Browse files Browse the repository at this point in the history
  • Loading branch information
duanhongyi committed Aug 6, 2024
1 parent 630bbd6 commit 9910b91
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ test-integration:

upload-coverage:
$(eval CI_ENV := $(shell curl -s https://codecov.io/env | bash))
podman run ${CI_ENV} -v ${CURDIR}:/test -w /test/rootfs ${IMAGE}.test /test/rootfs/bin/upload-coverage
podman run ${CI_ENV} -v ${CURDIR}:/test -w /test/rootfs -e CODECOV_TOKEN=${CODECOV_TOKEN} ${IMAGE}.test /test/rootfs/bin/upload-coverage

.PHONY: check-kubectl check-podman build podman-build podman-build-test deploy clean commit-hook full-clean test test-style test-unit test-functional test-integration upload-coverage
2 changes: 2 additions & 0 deletions rootfs/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ COPY dev_requirements.txt ${DRYCC_HOME_DIR}/dev_requirements.txt

RUN buildDeps='gcc rustc cargo libffi-dev musl-dev libldap2-dev libsasl2-dev'; \
install-packages ldap-utils mercurial ca-certificates openssl git $buildDeps \
&& curl -SsL https://cli.codecov.io/latest/$([ $(dpkg --print-architecture) == "arm64" ] && echo linux-arm64 || echo linux)/codecov -o /usr/local/bin/codecov \
&& chmod +x /usr/local/bin/codecov \
&& install-stack python $PYTHON_VERSION \
&& install-stack postgresql $POSTGRES_VERSION \
&& install-stack gosu $GOSU_VERSION && . init-stack \
Expand Down
1 change: 0 additions & 1 deletion rootfs/bin/test-unit
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ gosu postgres pg_ctl -D "$PGDATA" start && ln -s /tmp/.s.PGSQL.5432 /var/run/pos
creating_rsa_key
python3 manage.py check
coverage run manage.py test --settings=api.settings.testing --noinput api
coverage report -m
6 changes: 5 additions & 1 deletion rootfs/bin/upload-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
# fail hard and fast even on pipelines
set -eou pipefail

codecov --required
coverage report -m > coverage.txt

if [[ -n $CODECOV_TOKEN ]]; then
codecov upload-process --plugin=noop -t "$CODECOV_TOKEN"
fi
9 changes: 3 additions & 6 deletions rootfs/dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# test module
# test
# Run "make test-unit" for the % of code exercised during tests
coverage==7.4.4
coverage==7.6.1

# Run "make test-style" to check python syntax and style
flake8==7.0.0

# code coverage report at https://codecov.io/github/drycc/passport
codecov==2.1.13
flake8==7.1.1

# mock out python-requests, mostly k8s
requests-mock==1.11.0
requests-mock==1.12.1

0 comments on commit 9910b91

Please # to comment.