Skip to content

Commit 7556a20

Browse files
authored
Merge pull request #59 from nyu-devops/upgrade-codecov
Upgraded to codecov v5
2 parents a206e4c + 1fecd9a commit 7556a20

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"pytest",
1414
"Redis",
1515
"testdb"
16-
],
16+
],
1717
"[python]": {
1818
"editor.defaultFormatter": "ms-python.black-formatter",
1919
"editor.formatOnSave": true
@@ -50,12 +50,12 @@
5050
"tamasfe.even-better-toml",
5151
"donjayamanne.githistory",
5252
"GitHub.vscode-pull-request-github",
53+
"github.vscode-github-actions",
5354
"hbenl.vscode-test-explorer",
5455
"LittleFoxTeam.vscode-python-test-adapter",
5556
"redhat.vscode-yaml",
5657
"unjinjang.rest-api-client",
5758
"ms-azuretools.vscode-docker",
58-
"github.vscode-github-actions",
5959
"streetsidesoftware.code-spell-checker",
6060
"bbenoist.vagrant"
6161
]

.github/workflows/workflow.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# Label used to access the service container
1818
redis:
1919
# Docker Hub image
20-
image: redis
20+
image: redis:6-alpine
2121
# Set health checks to wait until redis has started
2222
options: >-
2323
--health-cmd "redis-cli ping"
@@ -45,14 +45,20 @@ jobs:
4545
pylint service tests --max-line-length=127
4646
4747
- name: Run unit tests with PyTest
48-
run: pytest --pspec --cov=service --cov-report=xml --cov-fail-under=95
48+
run: pytest --pspec --cov=service --cov-fail-under=95 --cov-report=xml
4949
env:
5050
DATABASE_URI: "redis://redis:6379"
5151

52+
######################################################################
5253
# Create a CODECOV_TOKEN in Settings->Secrets and variables->Actions
5354
# and then uncomment the CodeCov action during hands-on lab
55+
######################################################################
5456

55-
# - name: Upload coverage reports to Codecov
56-
# uses: codecov/[email protected]
57-
# with:
58-
# token: ${{ secrets.CODECOV_TOKEN }}
57+
- name: Install packages for Codecov to work
58+
run: apt-get update && apt-get install -y git curl gpg
59+
60+
- name: Upload coverage reports to Codecov
61+
uses: codecov/codecov-action@v5
62+
with:
63+
token: ${{ secrets.CODECOV_TOKEN }}
64+
slug: nyu-devops/lab-github-actions

0 commit comments

Comments
 (0)