From 7cd2ea3ff6258c3ae797fb3e8d76d8d66681fa94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Fri, 15 Mar 2024 13:38:23 +0100 Subject: [PATCH 1/4] ci: update some actions version --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6bb32f7..d46c61b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,7 +23,7 @@ jobs: name: Tests PHP ${{ matrix.php-version }} ${{ matrix.name }} steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: setup uses: shivammathur/setup-php@v2 with: From 2efd01aae0108d04676db6f19c8686e22f005240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Fri, 15 Mar 2024 13:41:48 +0100 Subject: [PATCH 2/4] ci: format yaml --- .github/workflows/ci.yaml | 69 +++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d46c61b..3621260 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,38 +1,37 @@ name: CI on: - push: - branches: - - master - pull_request: null - schedule: - - - cron: '0 0 * * MON' + push: + branches: + - master + pull_request: null + schedule: + - cron: "0 0 * * MON" jobs: - tests: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php-version: ['8.1', '8.2'] - composer-flags: [''] - name: [''] - include: - - php-version: '8.1' - composer-flags: '--prefer-lowest' - name: '(prefer lowest dependencies)' - name: Tests PHP ${{ matrix.php-version }} ${{ matrix.name }} - steps: - - name: checkout - uses: actions/checkout@v4 - - name: setup - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - - name: composer install - run: composer update --prefer-dist --no-interaction ${{ matrix.composer-flags }} - - name: Build docker - run: docker build -t httpbin . - - name: Run docker - run: docker run -d -p 8081:80 httpbin - - name: tests - run: composer test + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: ["8.1", "8.2"] + composer-flags: [""] + name: [""] + include: + - php-version: "8.1" + composer-flags: "--prefer-lowest" + name: "(prefer lowest dependencies)" + name: Tests PHP ${{ matrix.php-version }} ${{ matrix.name }} + steps: + - name: checkout + uses: actions/checkout@v4 + - name: setup + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + - name: composer install + run: composer update --prefer-dist --no-interaction ${{ matrix.composer-flags }} + - name: Build docker + run: docker build -t httpbin . + - name: Run docker + run: docker run -d -p 8081:80 httpbin + - name: tests + run: composer test From efbe726267c4b19fef200b4425f4dbb636857f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Fri, 15 Mar 2024 14:09:46 +0100 Subject: [PATCH 3/4] ci: add support for PHP 8.3 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3621260..c531139 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["8.1", "8.2"] + php-version: ["8.2", "8.3"] composer-flags: [""] name: [""] include: From 0626a147f5993b259d9a2d46ddf5a26d33a93873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Fri, 15 Mar 2024 14:16:21 +0100 Subject: [PATCH 4/4] ci: update installation of github.com/ahmetb/go-httpbin/cmd/httpbin --- .github/workflows/ci.yaml | 2 +- Dockerfile | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c531139..bef7753 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,6 +32,6 @@ jobs: - name: Build docker run: docker build -t httpbin . - name: Run docker - run: docker run -d -p 8081:80 httpbin + run: docker run -d --rm -p 8081:80 httpbin - name: tests run: composer test diff --git a/Dockerfile b/Dockerfile index 8eb86dc..5b6cb55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ -FROM golang:1.9-alpine3.7 +FROM golang:1.22-alpine -RUN apk --update add git -RUN go get github.com/ahmetb/go-httpbin/cmd/httpbin +RUN go install github.com/ahmetb/go-httpbin/cmd/httpbin@latest CMD ["bin/httpbin","-host",":80"]