Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
627b5dd
feat(tests): add code coverage
guidojw Oct 12, 2023
fff2529
fix: change volume handling
guidojw Oct 12, 2023
b15288f
fix: volume host dir
guidojw Oct 12, 2023
c8e9076
refactor: remove ifs
guidojw Oct 12, 2023
1f77171
fix: use lcov
guidojw Oct 13, 2023
21e81f8
fix: passthrough in mirage
guidojw Oct 13, 2023
2937cb9
test: remove files
guidojw Oct 13, 2023
adc5003
fix: add codecov path fixes
guidojw Oct 13, 2023
33ad380
fix: add leading slash path fix
guidojw Oct 13, 2023
2545e41
refactor: remove unnecessary files input
guidojw Oct 13, 2023
fc62254
fix: remove leading slash again
guidojw Oct 13, 2023
af18606
fix: test other fix
guidojw Oct 13, 2023
f6ffb06
fix: set files again
guidojw Oct 13, 2023
1fdc18f
chore: remove codecov.yml
guidojw Oct 13, 2023
a5b029a
fix: change Istanbul reporters
guidojw Oct 13, 2023
919c8f5
fix: prefix path with ./
guidojw Oct 13, 2023
f598383
test: only upload lcov.info
guidojw Oct 13, 2023
8af306c
fix: disable search
guidojw Oct 13, 2023
48b7d5f
fix: functionalities input
guidojw Oct 13, 2023
1596187
fix: checkout code
guidojw Oct 13, 2023
b291096
refactor: remove unnecessary -t
guidojw Oct 13, 2023
f0c3535
feat: add if-no-files-found on upload-artifact
guidojw Oct 13, 2023
7274b98
refactor: try tokenless report uploading
guidojw Oct 14, 2023
782fc9e
chore: update codecov-action
guidojw Mar 2, 2024
51fc628
Remove secret from continuous-integration.yml workflow input
lodewiges Oct 12, 2024
d812b60
Readd codecov secret to continuous-integration.yml
lodewiges Oct 12, 2024
a5c2c75
Provide secret in continuous-delivery.yml when invoking integration.yml
lodewiges Oct 12, 2024
58e8879
Added exception for feat/codecov into continuous-delivery.yml
lodewiges Oct 12, 2024
7a1e78b
reverted last change to continuous-delivery.yml
lodewiges Oct 12, 2024
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: 2 additions & 0 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ jobs:
uses: csvalpha/amber-ui/.github/workflows/continuous-integration.yml@staging
with:
sha: ${{ needs.merge.outputs.sha }}
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

publish_image:
name: Publish Image
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
description: The commit SHA to run the workflow on
required: false
type: string
secrets:
codecov_token:
description: Codecov token
required: true

jobs:
build:
Expand Down Expand Up @@ -70,11 +74,32 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
ref: ${{ inputs.sha }}

- name: Load test image
uses: guidojw/actions/load-docker-image@abb0ee8d1336edf73383f2e5a09abd3a22f25b13 # v1.3.3
with:
name: app

- name: Test
run: |
docker run -e CI=true -t app yarn test:ember
mkdir coverage
docker run -e CI=true -e COVERAGE=true -v "$(pwd)"'/coverage:/opt/app/coverage' app yarn test:ember

- name: Upload coverage report to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage report artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: coverage
path: coverage/
if-no-files-found: error
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Continuous Integration](https://github.com/csvalpha/amber-ui/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/csvalpha/amber-ui/actions/workflows/continuous-integration.yml)
[![Continuous Delivery](https://github.com/csvalpha/amber-ui/actions/workflows/continuous-delivery.yml/badge.svg)](https://github.com/csvalpha/amber-ui/actions/workflows/continuous-delivery.yml)
[![codecov](https://codecov.io/gh/csvalpha/amber-ui/graph/badge.svg?token=GMTXV28YQF)](https://codecov.io/gh/csvalpha/amber-ui)

## Prerequisites

Expand Down
1 change: 1 addition & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = function (defaults) {
},

babel: {
plugins: [...require('ember-cli-code-coverage').buildBabelPlugin()],
sourceMaps: 'inline',
},

Expand Down
2 changes: 2 additions & 0 deletions mirage/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default function () {
this.passthrough('/write-coverage');

this.namespace = '/api/v1';

this.post(
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"ember-can": "^4.2.0",
"ember-cli": "~4.11.0",
"ember-cli-babel": "^7.26.10",
"ember-cli-code-coverage": "^2.0.0",
"ember-cli-content-security-policy": "^2.0.3",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-dropzonejs": "^1.3.6",
Expand Down
9 changes: 9 additions & 0 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ import * as QUnit from 'qunit';
import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom';
import { start } from 'ember-qunit';
import {
forceModulesToBeLoaded,
sendCoverage,
} from 'ember-cli-code-coverage/test-support';

setApplication(Application.create(config.APP));

setup(QUnit.assert);

QUnit.done(async function () {
forceModulesToBeLoaded();
await sendCoverage();
});

start();
Loading
Loading