-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: save unit tests results to s3 bucket (#6357)
* chore: save unit tests results to s3 bucket * chore: copy-config skip lib check
- Loading branch information
1 parent
2997514
commit d279165
Showing
2 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,9 @@ jobs: | |
generate_test_report: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
UNIT_TEST_REPORT_FILE: './unit-tests.log' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -48,14 +51,20 @@ jobs: | |
- name: Test | ||
run: | | ||
set -o pipefail | ||
yarn test:all --stream -- --verbose --coverage --coverage_reporters=lcov 2>&1 | tee ./unit-tests.log | ||
yarn test:all --stream -- --verbose --coverage --coverage_reporters=lcov 2>&1 | tee ${{ env.UNIT_TEST_REPORT_FILE }} | ||
echo -e "COMMIT SHA = ${{ inputs.commit }}" >> ${{ env.UNIT_TEST_REPORT_FILE }} | ||
echo -e "TEST RUN DATE = $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${{ env.UNIT_TEST_REPORT_FILE }} | ||
- name: Print environment variables | ||
- name: Install AWS CLI | ||
run: | | ||
echo -e "COMMIT SHA = ${{ inputs.commit }}" >> ./unit-tests.log | ||
sudo apt-get update | ||
sudo apt-get install -y awscli | ||
- name: Save test coverage results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage-report | ||
path: ./unit-tests.log | ||
- name: Upload unit-tests.log to S3 | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: eu-west-1 | ||
run: | | ||
TIMESTAMP=$(date -u +'%Y%m%dT%H%M%SZ') | ||
aws s3 cp ${{ env.UNIT_TEST_REPORT_FILE }} s3://wire-webapp/unit-tests-web-packages-${TIMESTAMP}-${{ inputs.commit }}.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters