Skip to content

Commit

Permalink
can oidc pick up permissions from the other workflow?
Browse files Browse the repository at this point in the history
  • Loading branch information
nora-codecov committed Sep 12, 2024
1 parent 9ff749f commit a2dc5e4
Show file tree
Hide file tree
Showing 11 changed files with 6,624 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,22 @@ jobs:
name: Run tests and collect coverage
command: pytest --cov api.calculator
- codecov/upload
test-frontend:
docker:
- image: cimg/node:17.6.0
steps:
- checkout
- run:
name: Install requirements
command: cd web && npm install
- run:
name: Run tests and collect coverage
command: cd web && npm run test
- codecov/upload

workflows:
version: 2.1
build-test:
jobs:
- test-api
- test-api
- test-frontend
24 changes: 24 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Frontend workflow

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
name: Test JS frontend
defaults:
run:
working-directory: ./web
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install requirements
run: npm install
- name: Run tests and collect coverage
run: npm run test
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4.2.0
with:
use_oidc: true
7 changes: 7 additions & 0 deletions web/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"env": {
"test": {
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
}
}
36 changes: 36 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Codecov Server-side Calculator App</title>
<link rel="stylesheet" href="/static/css/calculator.css">
</head>
<body>
<div class="calculator">
<div class="output">
<div data-previous-operand class="previous-operand">123 +</div>
<div data-current-operand class="current-operand">456</div>
</div>
<button class="span-3 disabled"></button>
<button data-all-clear>C</button>
<button data-number>7</button>
<button data-number>8</button>
<button data-number>9</button>
<button data-operation>÷</button>
<button data-number>4</button>
<button data-number>5</button>
<button data-number>6</button>
<button data-operation>*</button>
<button data-number>1</button>
<button data-number>2</button>
<button data-number>3</button>
<button data-operation>-</button>
<button data-number>.</button>
<button data-number>0</button>
<button data-equals>=</button>
<button data-operation>+</button>
</div>
<script type="module" src="/static/js/calculatorView.js"></script>
</body>
</html>
Loading

0 comments on commit a2dc5e4

Please sign in to comment.