diff --git a/src/Enum/ArchiveCompression.php b/src/Enum/ArchiveCompression.php index 1cc3594..2b485b3 100644 --- a/src/Enum/ArchiveCompression.php +++ b/src/Enum/ArchiveCompression.php @@ -10,4 +10,5 @@ enum ArchiveCompression: string case Gzip = 'gzip'; case Zstd = 'zstd'; case Lz4 = 'lz4'; + case Lz4hc = 'lz4hc'; } diff --git a/tests/JobsTest.php b/tests/JobsTest.php index 74f6bf2..2a7d7b7 100644 --- a/tests/JobsTest.php +++ b/tests/JobsTest.php @@ -72,7 +72,7 @@ public function test_create_serializes_artifacts_and_callback(): void new UnarchiveArtifact('extract', 'code.tar.gz', 'source', subdir: 'functions/node', strip: true, depends: 'source'), new ArchiveArtifact('build', 'build-output', 'build.tar', format: ArchiveFormat::Tar, compression: ArchiveCompression::Gzip, level: 6, depends: 'job'), new ArchiveArtifact('cache', 'stores', 'stores.sqfs', format: ArchiveFormat::Squashfs, compression: ArchiveCompression::Lz4, blockSize: 1048576, depends: 'job'), - new ArchiveArtifact('image', 'stores', 'stores.erofs', format: ArchiveFormat::Erofs, depends: 'job'), + new ArchiveArtifact('image', 'stores', 'stores.erofs', format: ArchiveFormat::Erofs, compression: ArchiveCompression::Lz4hc, depends: 'job'), new UploadArtifact('upload', 'build.tar', 'https://example.com/upload', depends: 'build', headers: ['X-Appwrite-Project' => 'project']), new ListArtifact('files', 'output', recursive: false, excludes: ['node_modules'], depends: 'job'), new MountArtifact('layer', 'layer.squashfs', 'layers/base', writable: true, size: 512, depends: 'download'), @@ -109,7 +109,7 @@ public function test_create_serializes_artifacts_and_callback(): void ['id' => 'extract', 'type' => 'unarchive', 'depends' => 'source', 'in' => 'code.tar.gz', 'out' => 'source', 'subdir' => 'functions/node', 'strip' => true], ['id' => 'build', 'type' => 'archive', 'depends' => 'job', 'in' => 'build-output', 'out' => 'build.tar', 'format' => 'tar', 'compression' => 'gzip', 'level' => 6], ['id' => 'cache', 'type' => 'archive', 'depends' => 'job', 'in' => 'stores', 'out' => 'stores.sqfs', 'format' => 'squashfs', 'compression' => 'lz4', 'blockSize' => 1048576], - ['id' => 'image', 'type' => 'archive', 'depends' => 'job', 'in' => 'stores', 'out' => 'stores.erofs', 'format' => 'erofs'], + ['id' => 'image', 'type' => 'archive', 'depends' => 'job', 'in' => 'stores', 'out' => 'stores.erofs', 'format' => 'erofs', 'compression' => 'lz4hc'], ['id' => 'upload', 'type' => 'upload', 'depends' => 'build', 'in' => 'build.tar', 'out' => 'https://example.com/upload', 'headers' => ['X-Appwrite-Project' => 'project']], ['id' => 'files', 'type' => 'list', 'depends' => 'job', 'in' => 'output', 'recursive' => false, 'excludes' => ['node_modules']], ['id' => 'layer', 'type' => 'mount', 'depends' => 'download', 'in' => 'layer.squashfs', 'out' => 'layers/base', 'writable' => true, 'size' => 512],