mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-12-25 06:17:02 +00:00
Rename workflow file for tests
This commit is contained in:
parent
4c85713eab
commit
a7e92b2e9d
1 changed files with 0 additions and 0 deletions
77
.github/workflows/workflow.yml
vendored
77
.github/workflows/workflow.yml
vendored
|
|
@ -1,77 +0,0 @@
|
|||
name: Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- releases/**
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- releases/**
|
||||
- fix/**
|
||||
- v4
|
||||
|
||||
jobs:
|
||||
# End to end save and restore
|
||||
test-save:
|
||||
runs-on: runs-on,runner=2cpu-linux-arm64
|
||||
strategy:
|
||||
matrix:
|
||||
part_size: [32]
|
||||
queue_size: [4, 8]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Generate files in working directory
|
||||
shell: bash
|
||||
run: |
|
||||
__tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
||||
# 5GB
|
||||
# curl -o test-cache/ubuntu.iso https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-desktop-amd64.iso
|
||||
# 2Gb
|
||||
curl -o test-cache/ubuntu.iso https://releases.ubuntu.com/jammy/ubuntu-22.04.3-live-server-amd64.iso
|
||||
- name: Generate files outside working directory
|
||||
shell: bash
|
||||
run: __tests__/create-cache-files.sh ${{ runner.os }} ~/test-cache
|
||||
- name: Save cache
|
||||
uses: ./
|
||||
env:
|
||||
UPLOAD_PART_SIZE: ${{ matrix.part_size }}
|
||||
UPLOAD_QUEUE_SIZE: ${{ matrix.queue_size }}
|
||||
with:
|
||||
key: test-${{ runner.os }}-${{ github.run_id }}-${{ matrix.part_size }}-${{ matrix.queue_size }}
|
||||
path: |
|
||||
test-cache
|
||||
~/test-cache
|
||||
test-restore:
|
||||
needs: test-save
|
||||
strategy:
|
||||
matrix:
|
||||
part_size: [8, 16]
|
||||
queue_size: [8, 12]
|
||||
fail-fast: false
|
||||
runs-on: runs-on,runner=2cpu-linux-arm64
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Restore cache
|
||||
uses: ./
|
||||
env:
|
||||
DOWNLOAD_PART_SIZE: ${{ matrix.part_size }}
|
||||
DOWNLOAD_QUEUE_SIZE: ${{ matrix.queue_size }}
|
||||
with:
|
||||
key: test-${{ runner.os }}-${{ github.run_id }}-${{ matrix.part_size }}-${{ matrix.queue_size }}
|
||||
restore-keys: |
|
||||
test-${{ runner.os }}-${{ github.run_id }}-${{ matrix.part_size }}-
|
||||
test-${{ runner.os }}-${{ github.run_id }}-
|
||||
path: |
|
||||
test-cache
|
||||
~/test-cache
|
||||
- name: Verify cache files in working directory
|
||||
shell: bash
|
||||
run: __tests__/verify-cache-files.sh ${{ runner.os }} test-cache
|
||||
- name: Verify cache files outside working directory
|
||||
shell: bash
|
||||
run: __tests__/verify-cache-files.sh ${{ runner.os }} ~/test-cache
|
||||
Loading…
Add table
Add a link
Reference in a new issue