Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/utopia-php/storage into cho…
Browse files Browse the repository at this point in the history
…re-remove-compression
  • Loading branch information
loks0n committed Dec 4, 2024
2 parents aef3e5b + 30ffe50 commit 756a1f9
Show file tree
Hide file tree
Showing 21 changed files with 1,161 additions and 342 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: "Tests"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on: [pull_request]
jobs:
build:
name: Build & Unit
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build image
uses: docker/build-push-action@v3
with:
context: .
push: false
load: true
tags: storage-dev
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Start storage
env:
DO_ACCESS_KEY: ${{ secrets.DO_ACCESS_KEY }}
DO_SECRET: ${{ secrets.DO_SECRET }}
LINODE_ACCESS_KEY: ${{ secrets.LINODE_ACCESS_KEY }}
LINODE_SECRET: ${{ secrets.LINODE_SECRET }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET: ${{ secrets.S3_SECRET }}
WASABI_ACCESS_KEY: ${{ secrets.WASABI_ACCESS_KEY }}
WASABI_SECRET: ${{ secrets.WASABI_SECRET }}
BACKBLAZE_ACCESS_KEY: ${{ secrets.BACKBLAZE_ACCESS_KEY }}
BACKBLAZE_SECRET: ${{ secrets.BACKBLAZE_SECRET }}
run: |
docker compose up -d
sleep 10
- name: Doctor
run: |
docker compose logs tests
docker ps
- name: Unit Tests
run: docker compose exec -T tests vendor/bin/phpunit --configuration phpunit.xml --debug --testsuite unit

e2e_test:
name: E2E Test
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
devices: [BackblazeTest, DOSpacesTest, LinodeTest, LocalTest, S3Test, WasabiTest]

steps:
- name: checkout
uses: actions/checkout@v3
- name: Start storage
env:
DO_ACCESS_KEY: ${{ secrets.DO_ACCESS_KEY }}
DO_SECRET: ${{ secrets.DO_SECRET }}
LINODE_ACCESS_KEY: ${{ secrets.LINODE_ACCESS_KEY }}
LINODE_SECRET: ${{ secrets.LINODE_SECRET }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET: ${{ secrets.S3_SECRET }}
WASABI_ACCESS_KEY: ${{ secrets.WASABI_ACCESS_KEY }}
WASABI_SECRET: ${{ secrets.WASABI_SECRET }}
BACKBLAZE_ACCESS_KEY: ${{ secrets.BACKBLAZE_ACCESS_KEY }}
BACKBLAZE_SECRET: ${{ secrets.BACKBLAZE_SECRET }}
run: |
docker compose up -d
sleep 10
- name: Run ${{matrix.devices}}
run: docker compose exec -T tests vendor/bin/phpunit tests/Storage/Device/${{matrix.devices}}.php
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
"ext-lz4": "*",
"ext-snappy": "*",
"php": ">=8.0",
"utopia-php/framework": "0.*.*"
"utopia-php/framework": "1.0.*",
"utopia-php/system": "0.9.*"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1",
"laravel/pint": "1.2.*"
},
"minimum-stability": "dev"
"minimum-stability": "stable"
}
Loading

0 comments on commit 756a1f9

Please sign in to comment.