From 53ecd6ca8ee1c0ec7390aedc1ff2b99484b375fd Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Tue, 18 Apr 2023 08:18:49 +0200 Subject: [PATCH] use semantic branch name and avoid double builds --- .github/workflows/tests.yml | 2 ++ CONTRIBUTING.md | 4 ++-- README.md | 2 +- composer.json | 5 ----- tests/FunctionTest.php | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4f7de5..65d2e28 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,6 +2,8 @@ name: tests on: push: + branches: + - '*.x' pull_request: jobs: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3fd134b..c1a55ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,11 +72,11 @@ please squash them before submitting with the following commands $ git rebase -i HEAD~3 ``` -If your branch conflicts with the master branch, you will need to rebase and repush it with the following commands: +If your branch conflicts with the target branch, you will need to rebase and repush it with the following commands: ``` bash $ git remote add upstream git@github.com:orga/repo-name.git -$ git pull --rebase upstream master +$ git pull --rebase upstream 1.x $ git push -f origin feature-or-bug-fix-description ``` diff --git a/README.md b/README.md index 764ff73..a1c30fa 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Latest Version](https://img.shields.io/github/release/php-http/multipart-stream-builder.svg?style=flat-square)](https://github.com/php-http/multipart-stream-builder/releases) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/multipart-stream-builder/master.svg?style=flat-square)](https://travis-ci.org/php-http/multipart-stream-builder) +[![Build Status](https://github.com/php-http/multipart-stream-builder/actions/workflows/tests.yml/badge.svg)](https://github.com/php-http/multipart-stream-builder/actions/workflows/tests.yml) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/multipart-stream-builder.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/multipart-stream-builder) [![Quality Score](https://img.shields.io/scrutinizer/g/php-http/multipart-stream-builder.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/multipart-stream-builder) [![Total Downloads](https://img.shields.io/packagist/dt/php-http/multipart-stream-builder.svg?style=flat-square)](https://packagist.org/packages/php-http/multipart-stream-builder) diff --git a/composer.json b/composer.json index 05e84d0..9924ca1 100644 --- a/composer.json +++ b/composer.json @@ -35,10 +35,5 @@ "scripts": { "test": "vendor/bin/phpunit", "test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml" - }, - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } } } diff --git a/tests/FunctionTest.php b/tests/FunctionTest.php index 3d9c6ea..64b31a6 100644 --- a/tests/FunctionTest.php +++ b/tests/FunctionTest.php @@ -40,7 +40,7 @@ public function testSupportResources() public function testSupportURIResources() { - $url = 'https://raw.githubusercontent.com/php-http/multipart-stream-builder/master/tests/Resources/httplug.png'; + $url = 'https://raw.githubusercontent.com/php-http/multipart-stream-builder/1.x/tests/Resources/httplug.png'; $resource = fopen($url, 'r'); $builder = new MultipartStreamBuilder();