Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
90 changes: 71 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
server: ${{ matrix.httpServer }}
coreVersion: ${{ matrix.coreVersion }}

- name: Upload the log file
- name: Upload the log file as artifact
uses: actions/upload-artifact@v2
with:
name: Nextcloud-logs (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
Expand All @@ -186,44 +186,96 @@ jobs:
echo "Exiting with ${{ env.test_result }}" ;
exit "${{ env.test_result }}"

- name: Upload the coverage reports to codecov.io
shell: bash
run: >-
bash <(curl -s https://codecov.io/bash)
-F unittests
-f .github/actions/run-tests/volumes/coverage/latest/coverage.unit.xml
-R .
-X gcov
&&
bash <(curl -s https://codecov.io/bash)
-F integration
-f .github/actions/run-tests/volumes/coverage/latest/coverage.integration.xml
-R .
-X gcov
if: ${{ steps.run-tests.outputs.silentFail == 'false' }}

- name: Copy coverage-reports into non-link folder
shell: bash
run: >-
mkdir /tmp/coverage &&
rsync -a .github/actions/run-tests/volumes/coverage/latest/ /tmp/coverage
if: ${{ steps.run-tests.outputs.silentFail == 'false' }}

- name: Upload the code coverage report (unit tests)
- name: Upload the code coverage report (unit tests) as artifacts
uses: actions/upload-artifact@v2
with:
name: Code coverage (HTML) (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
path: "/tmp/coverage"
if: ${{ steps.run-tests.outputs.silentFail == 'false' }}

- name: Upload the junit log file artifact
- name: Upload the junit log file artifact as artifact
uses: actions/upload-artifact@v2
with:
name: Junit test log files (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
path: .github/actions/run-tests/volumes/coverage/junit*.xml
if: always()


upload-codecov:
name: Upload artifacts to codecov.io
needs:
- unit-tests
runs-on: ubuntu-latest

steps:
- name: Create folder structure
run: mkdir artifacts code unit-coverage integration-coverage
- name: Download artifacts
uses: actions/[email protected]
with:
path: artifacts
- name: Checkout of code base
uses: actions/checkout@v2
with:
path: code
fetch-depth: 2

- name: Download the uploader
run: |
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig

gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM

chmod +x codecov

- name: Copy Coverage reports to separate folders
run: |
cd artifacts

for i in Code*
do
if [ -f "$i/coverage.unit.xml" ]; then
mkdir -p "../unit-coverage/$i"
cp "$i/coverage.unit.xml" "../unit-coverage/$i/coverage.xml"
fi
if [ -f "$i/coverage.integration.xml" ]; then
mkdir -p "../integration-coverage/$i"
cp "$i/coverage.integration.xml" "../integration-coverage/$i/coverage.xml"
fi
done
- name: Show file structure
run: ls -lR unit-coverage integration-coverage

- name: Upload unit test codecov reports
run: >-
./codecov
-F unittests
-s unit-coverage
-R code
-X gcov
-v
- name: Upload integration test codecov reports
run: >-
./codecov
-F integration
-s integration-coverage
-R code
-X gcov
-v



source-package:
name: Create source code artifacts
needs:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
[#807](https://github.com/nextcloud/cookbook/pull/807) @christianlupus
- Correct unit testing for dependabot and forked branches
[#811](https://github.com/nextcloud/cookbook/pull/811) @christianlupus
- Updated codecov parser to binary version (fix #810)
[#813](https://github.com/nextcloud/cookbook/pull/813) @christianlupus


## 0.9.4 - 2021-09-29
Expand Down