Skip to content

Commit a387708

Browse files
committed
chore(tests): use latest codecov
1 parent d76dfdd commit a387708

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ test-integration:
6363

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

6868
.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

rootfs/Dockerfile.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ ENV PGDATA="/opt/drycc/postgresql/data" \
1515

1616
RUN buildDeps='gcc rustc cargo libffi-dev musl-dev openssl'; \
1717
install-packages mercurial ca-certificates git inotify-tools $buildDeps \
18+
&& curl -SsL https://cli.codecov.io/latest/$([ $(dpkg --print-architecture) == "arm64" ] && echo linux-arm64 || echo linux)/codecov -o /usr/local/bin/codecov \
19+
&& chmod +x /usr/local/bin/codecov \
1820
&& install-stack python $PYTHON_VERSION \
1921
&& install-stack redis $REDIS_VERSION \
2022
&& install-stack rabbitmq $RABBITMQ_VERSION \

rootfs/bin/test-unit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ start_redis
2323
start_rabbitmq
2424
python3 manage.py check
2525
coverage run --source=api,scheduler manage.py test --settings=api.settings.testing --noinput api scheduler.tests --exclude-tag=auth
26-
coverage report -m

rootfs/bin/upload-coverage

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@
66
# fail hard and fast even on pipelines
77
set -eou pipefail
88

9-
codecov --required
9+
coverage report -m > coverage.txt
10+
11+
if [[ -n $CODECOV_TOKEN ]]; then
12+
codecov upload-process --plugin=noop -t "$CODECOV_TOKEN"
13+
fi

rootfs/dev_requirements.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
# test module
22
# test
33
# Run "make test-unit" for the % of code exercised during tests
4-
coverage==7.4.4
4+
coverage==7.6.1
55

66
# Run "make test-style" to check python syntax and style
7-
flake8==7.0.0
8-
9-
# code coverage report at https://codecov.io/github/drycc/controller
10-
codecov==2.1.13
7+
flake8==7.1.1
118

129
# mock out python-requests, mostly k8s
13-
requests-mock==1.11.0
10+
requests-mock==1.12.1

0 commit comments

Comments
 (0)