Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: cleanup cover data #5595

Merged
merged 6 commits into from
Jan 22, 2025
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
6 changes: 4 additions & 2 deletions .github/actions/mount-coverage-dir/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ runs:
shell: bash
run: |
sudo mkdir -p /root/.juicefs
sudo wget -q s.juicefs.com/static/Linux/mount -O /root/.juicefs/jfsmount
sudo chmod +x /root/.juicefs/jfsmount
if ! sudo test -f /root/.juicefs/jfsmount; then
sudo wget -q s.juicefs.com/static/Linux/mount -O /root/.juicefs/jfsmount
sudo chmod +x /root/.juicefs/jfsmount
fi
sudo curl -s -L https://juicefs.com/static/juicefs -o /usr/local/bin/juicefs && sudo chmod +x /usr/local/bin/juicefs
if [[ -n "${{inputs.access_key}}" && -n "${{inputs.secret_key}}" && -n "${{inputs.token}}" ]]; then
sudo juicefs auth ci-coverage --access-key ${{ inputs.access_key }} --secret-key ${{ inputs.secret_key }} --token ${{inputs.token}} --encrypt-keys
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ jobs:
with:
fetch-depth: 1

- name: mount coverage dir for cleanup
if: ${{ matrix.test == 'all' }}
timeout-minutes: 5
uses: ./.github/actions/mount-coverage-dir
with:
mount_point: /ci-coverage
subdir: juicefs/
access_key: ${{ secrets.CI_COVERAGE_AWS_AK }}
secret_key: ${{ secrets.CI_COVERAGE_AWS_SK }}
token: ${{ secrets.CI_COVERAGE_AWS_TOKEN }}

- name: clean up old coverage data
if: ${{ matrix.test == 'all' }}
continue-on-error: true
timeout-minutes: 10
run: |
sudo find /ci-coverage -type f \( -name 'covcounters*' -o -name 'covmeta*' \) -mtime +2 -print -exec rm -f {} +
umount /jfs-coverage

- name: mount coverage dir
timeout-minutes: 5
uses: ./.github/actions/mount-coverage-dir
Expand Down
Loading