Updated .gitlab* files to be consistent with other projects
This commit is contained in:
parent
d9279d0a54
commit
40a4808f98
@ -7,7 +7,7 @@ stages:
|
||||
cache:
|
||||
key: ${CI_JOB_NAME_SLUG}-${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- vendor/
|
||||
- vendor/
|
||||
|
||||
include:
|
||||
# .gitlab-test.yml
|
||||
|
44
.gitlab-test.yml
Normal file
44
.gitlab-test.yml
Normal file
@ -0,0 +1,44 @@
|
||||
test:
|
||||
stage: test
|
||||
|
||||
image: ${CI_REGISTRY}/leenooks/php:8.1-fpm-alpine-test
|
||||
services:
|
||||
- postgres:15-alpine
|
||||
|
||||
variables:
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: ate
|
||||
POSTGRES_INITDB_ARGS: "--data-checksums"
|
||||
|
||||
tags:
|
||||
- x86_64
|
||||
|
||||
before_script:
|
||||
- mv .env.testing .env
|
||||
|
||||
# Install Composer and project dependencies.
|
||||
- mkdir -p /root/.config/composer
|
||||
- if [ -n "$GITHUB_TOKEN" ]; then cat $GITHUB_TOKEN |base64 -d > /root/.config/composer/auth.json ; fi
|
||||
- composer install
|
||||
- npm install
|
||||
- npm run build
|
||||
|
||||
# Run database migrations.
|
||||
- php artisan migrate
|
||||
|
||||
# Run database seed
|
||||
- php artisan db:seed
|
||||
|
||||
# Start steno
|
||||
# php -S localhost:8080 -t public &
|
||||
# node_modules/steno/bin/./steno --replay --app http://localhost:8080 --out-port 3000 --scenario-dir /tests/steno &
|
||||
|
||||
script:
|
||||
# run laravel tests
|
||||
- XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text --colors=never
|
||||
|
||||
# run frontend tests
|
||||
# if you have any task for testing frontend
|
||||
# set it in your package.json script
|
||||
# comment this out if you don't have a frontend test
|
||||
# npm test
|
10
Dockerfile
10
Dockerfile
@ -2,10 +2,10 @@ FROM registry.dege.au/leenooks/php:8.1-fpm-alpine
|
||||
|
||||
COPY . /var/www/html/
|
||||
|
||||
RUN mkdir /var/cache/composer && \
|
||||
([ -r auth.json ] && mv auth.json /var/cache/composer/) || true && \
|
||||
RUN mkdir -p ${COMPOSER_HOME} && \
|
||||
([ -r auth.json ] && mv auth.json ${COMPOSER_HOME}) || true && \
|
||||
touch .composer.refresh && \
|
||||
mv .env.example .env && \
|
||||
FORCE_PERMS=1 /sbin/init && \
|
||||
rm -rf /var/cache/composer/* && \
|
||||
touch .migrate && chmod g+w database
|
||||
FORCE_PERMS=1 NGINX_START=FALSE /sbin/init && \
|
||||
touch .migrate && \
|
||||
rm -rf ${COMPOSER_HOME}/*
|
||||
|
Loading…
Reference in New Issue
Block a user