Compare commits
No commits in common. "07993ad6798dd420d32d6fa645e14356ee564918" and "de42bdca3856aabadd2d3ae46d5f92771ad06158" have entirely different histories.
07993ad679
...
de42bdca38
3 changed files with 11 additions and 73 deletions
|
|
@ -4,20 +4,27 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: ['release/*']
|
branches: ['release/*']
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, 'release/*']
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: forge.lvl0.xyz/lvl0/fedi-feed-router-ci:latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up PHP
|
||||||
|
uses: https://github.com/shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.3'
|
||||||
|
extensions: pdo_sqlite, mbstring, xml, dom
|
||||||
|
coverage: pcov
|
||||||
|
|
||||||
- name: Cache Composer dependencies
|
- name: Cache Composer dependencies
|
||||||
uses: https://data.forgejo.org/actions/cache@v4
|
uses: https://data.forgejo.org/actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/composer
|
path: ~/.composer/cache
|
||||||
key: composer-${{ hashFiles('composer.lock') }}
|
key: composer-${{ hashFiles('composer.lock') }}
|
||||||
restore-keys: composer-
|
restore-keys: composer-
|
||||||
|
|
||||||
|
|
@ -34,4 +41,4 @@ jobs:
|
||||||
run: vendor/bin/phpstan analyse --memory-limit=1G
|
run: vendor/bin/phpstan analyse --memory-limit=1G
|
||||||
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: php -d memory_limit=512M vendor/bin/phpunit
|
run: php artisan test --coverage-clover coverage.xml --coverage-text
|
||||||
|
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
name: Build and Push Base Images
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
paths:
|
|
||||||
- 'docker/build/**'
|
|
||||||
- '.forgejo/workflows/images.yml'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
images:
|
|
||||||
runs-on: docker
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- name: fedi-feed-router-base
|
|
||||||
file: docker/build/Dockerfile.base
|
|
||||||
- name: fedi-feed-router-ci
|
|
||||||
file: docker/build/Dockerfile.ci
|
|
||||||
steps:
|
|
||||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: https://data.forgejo.org/docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Login to Forgejo Registry
|
|
||||||
uses: https://data.forgejo.org/docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: forge.lvl0.xyz
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: https://data.forgejo.org/docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ${{ matrix.file }}
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
forge.lvl0.xyz/lvl0/${{ matrix.name }}:latest
|
|
||||||
forge.lvl0.xyz/lvl0/${{ matrix.name }}:${{ github.sha }}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
# Image for CI: PHP and Composer only, no runtime server or frontend toolchain.
|
|
||||||
# Tests run against sqlite in memory (see .env.testing), so no database client
|
|
||||||
# or cache extension is needed.
|
|
||||||
#
|
|
||||||
# Extensions here are the ext-* requirements from composer.lock that php:alpine
|
|
||||||
# does not already bundle. Regenerate that list before changing this file.
|
|
||||||
FROM php:8.3-alpine
|
|
||||||
|
|
||||||
COPY --from=mlocati/php-extension-installer:2 /usr/bin/install-php-extensions /usr/local/bin/
|
|
||||||
|
|
||||||
RUN install-php-extensions \
|
|
||||||
pdo_sqlite \
|
|
||||||
mbstring \
|
|
||||||
dom \
|
|
||||||
xml \
|
|
||||||
fileinfo \
|
|
||||||
iconv \
|
|
||||||
pcntl \
|
|
||||||
posix
|
|
||||||
|
|
||||||
# nodejs is not used by the app's tests; the Forgejo/GitHub JavaScript actions
|
|
||||||
# (checkout, cache) are executed with it inside this container.
|
|
||||||
RUN apk add --no-cache git unzip nodejs
|
|
||||||
|
|
||||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
||||||
Loading…
Reference in a new issue