Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin committed May 2, 2024
1 parent b9a6cb6 commit 79be5a1
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 74 deletions.
134 changes: 67 additions & 67 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
name: Static analysis
# name: Static analysis

on:
pull_request:
types: [opened, synchronize, reopened]
# on:
# pull_request:
# types: [opened, synchronize, reopened]

workflow_run:
workflows: ['Compress images']
types: [completed]
# workflow_run:
# workflows: ['Compress images']
# types: [completed]

env:
php-version: '8.2'
# env:
# php-version: '8.2'

concurrency:
group: Static analysis ${{ github.ref }}
cancel-in-progress: true
# concurrency:
# group: Static analysis ${{ github.ref }}
# cancel-in-progress: true

jobs:
psalm:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
# jobs:
# psalm:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout sources
# uses: actions/checkout@v4

- name: Setup PHP ${{ env.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: redis
coverage: none
# - name: Setup PHP ${{ env.php-version }}
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ env.php-version }}
# extensions: redis
# coverage: none

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer files
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ env.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ env.php-version }}-${{ hashFiles('**/composer.lock') }}
${{ runner.os }}-composer-${{ env.php-version }}
${{ runner.os }}-composer-
# - name: Get Composer Cache Directory
# id: composer-cache
# run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
# - name: Cache composer files
# uses: actions/cache@v3
# with:
# path: ${{ steps.composer-cache.outputs.dir }}
# key: ${{ runner.os }}-composer-${{ env.php-version }}-${{ hashFiles('**/composer.lock') }}
# restore-keys: |
# ${{ runner.os }}-composer-${{ env.php-version }}-${{ hashFiles('**/composer.lock') }}
# ${{ runner.os }}-composer-${{ env.php-version }}
# ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
# - name: Install dependencies
# run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader

- name: Run psalm
run: vendor/bin/psalm --output-format=github
# - name: Run psalm
# run: vendor/bin/psalm --output-format=github


phpstan:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
# phpstan:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout sources
# uses: actions/checkout@v4

- name: Setup PHP ${{ env.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: redis
coverage: none
# - name: Setup PHP ${{ env.php-version }}
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ env.php-version }}
# extensions: redis
# coverage: none

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer files
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ env.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ env.php-version }}-${{ hashFiles('**/composer.lock') }}
${{ runner.os }}-composer-${{ env.php-version }}
${{ runner.os }}-composer-
# - name: Get Composer Cache Directory
# id: composer-cache
# run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
# - name: Cache composer files
# uses: actions/cache@v3
# with:
# path: ${{ steps.composer-cache.outputs.dir }}
# key: ${{ runner.os }}-composer-${{ env.php-version }}-${{ hashFiles('**/composer.lock') }}
# restore-keys: |
# ${{ runner.os }}-composer-${{ env.php-version }}-${{ hashFiles('**/composer.lock') }}
# ${{ runner.os }}-composer-${{ env.php-version }}
# ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
# - name: Install dependencies
# run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader

- name: Run phpstan
run: vendor/bin/phpstan analyse
# - name: Run phpstan
# run: vendor/bin/phpstan analyse
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.1']
php-version: ['8.2']
connection: [mysql]

steps:
Expand Down
8 changes: 2 additions & 6 deletions tests/Api/DAV/CardDAVTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,10 @@ public function test_carddav_sync_collection_deleted_contact()
->get()
->last();

$response->assertSee("<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:card=\"urn:ietf:params:xml:ns:carddav\" xmlns:cal=\"urn:ietf:params:xml:ns:caldav\" xmlns:cs=\"http://calendarserver.org/ns/\">
$response->assertSee("<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:card=\"urn:ietf:params:xml:ns:carddav\">
<d:response>
<d:status>HTTP/1.1 404 Not Found</d:status>
<d:href>/dav/addressbooks/{$user->email}/contacts/{$contact->uuid}.vcf</d:href>
<d:propstat>
<d:prop/>
<d:status>HTTP/1.1 418 I'm a teapot</d:status>
</d:propstat>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:response>
<d:sync-token>http://sabre.io/ns/sync/{$token->id}</d:sync-token>
</d:multistatus>", false);
Expand Down

0 comments on commit 79be5a1

Please sign in to comment.