Skip to content

Commit

Permalink
Merge tag 'v1.2.1' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
jobara committed Nov 21, 2023
2 parents baa6956 + 9ca621e commit db150b3
Show file tree
Hide file tree
Showing 495 changed files with 16,435 additions and 9,652 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ on:
jobs:
php-analyze:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
id: git-diff
with:
Expand All @@ -22,7 +25,8 @@ jobs:
- uses: shivammathur/setup-php@v2
if: steps.git-diff.outputs.diff
with:
php-version: "8.1"
php-version: ${{ matrix.php }}
coverage: none
- name: Cache Composer packages
if: steps.git-diff.outputs.diff
uses: actions/cache@v3
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/asset-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ on:
jobs:
asset-lint:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
id: git-diff
with:
Expand All @@ -23,7 +26,8 @@ jobs:
- uses: shivammathur/setup-php@v2
if: steps.git-diff.outputs.diff
with:
php-version: "8.1"
php-version: ${{ matrix.php }}
coverage: none
- name: Cache Composer packages
if: steps.git-diff.outputs.diff
uses: actions/cache@v3
Expand All @@ -33,7 +37,7 @@ jobs:
- name: Install dependencies
if: steps.git-diff.outputs.diff
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
if: steps.git-diff.outputs.diff
with:
node-version-file: ".nvmrc"
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ on:
jobs:
frontend-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
id: git-diff
with:
Expand All @@ -26,7 +29,8 @@ jobs:
- uses: shivammathur/setup-php@v2
if: steps.git-diff.outputs.diff
with:
php-version: "8.1"
php-version: ${{ matrix.php }}
coverage: none
- name: Cache Composer packages
if: steps.git-diff.outputs.diff
uses: actions/cache@v3
Expand All @@ -36,7 +40,7 @@ jobs:
- name: Install Dependencies
if: steps.git-diff.outputs.diff
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
if: steps.git-diff.outputs.diff
with:
node-version-file: ".nvmrc"
Expand Down Expand Up @@ -83,7 +87,7 @@ jobs:
if: steps.git-diff.outputs.diff
env:
APP_URL: "http://127.0.0.1:8000"
run: php artisan dusk
run: php artisan pest:dusk
- name: Upload Screenshots
if: failure()
uses: actions/upload-artifact@v3
Expand Down
48 changes: 40 additions & 8 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ jobs:

name: tests - PHP ${{ matrix.php }}

steps:
outputs:
diff: ${{ steps.git-diff.outputs.diff }}

- uses: actions/checkout@v3
steps:
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
id: git-diff
with:
Expand All @@ -30,6 +32,7 @@ jobs:
if: steps.git-diff.outputs.diff
with:
php-version: ${{ matrix.php }}
coverage: pcov
- name: Cache Composer packages
if: steps.git-diff.outputs.diff
uses: actions/cache@v3
Expand All @@ -39,7 +42,7 @@ jobs:
- name: Install Dependencies
if: steps.git-diff.outputs.diff
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
if: steps.git-diff.outputs.diff
with:
node-version-file: ".nvmrc"
Expand All @@ -58,7 +61,7 @@ jobs:
if: steps.git-diff.outputs.diff
run: |
sudo systemctl start mysql.service
mysqladmin create accessibilityexchange --user="root" --password="root"
mysqladmin create tae-test --user="root" --password="root"
- name: Copy .env
if: steps.git-diff.outputs.diff
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
Expand All @@ -70,17 +73,46 @@ jobs:
- name: Directory Permissions
if: steps.git-diff.outputs.diff
run: chmod -R 777 storage bootstrap/cache
- name: Run tests with Pest
if: steps.git-diff.outputs.diff
- name: Run tests
if: steps.git-diff.outputs.diff && matrix.php == '8.2'
env:
DB_DATABASE: tae-test
DB_PASSWORD: root
DB_HOST: localhost
run: |
php artisan migrate
php artisan storage:link
php artisan test --parallel --coverage-clover coverage.xml
- name: Upload coverage to Codecov
php artisan test
- name: Run tests with coverage
if: steps.git-diff.outputs.diff && matrix.php == '8.1'
env:
DB_DATABASE: tae-test
DB_PASSWORD: root
DB_HOST: localhost
run: |
php artisan migrate
php artisan storage:link
php artisan test --coverage-clover coverage.xml
- name: Save code coverage to artifact
uses: actions/upload-artifact@v3
if: steps.git-diff.outputs.diff && matrix.php == '8.1'
with:
name: code-coverage
path: "coverage.xml"
retention-days: 5

upload-coverage:
runs-on: ubuntu-latest
needs:
- laravel-tests
if: needs.laravel-tests.outputs.diff
steps:
- uses: actions/checkout@v4
- name: Fetch code coverage artifact
uses: actions/download-artifact@v3
with:
name: code-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ on:
jobs:
lighthouse-ci:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # https://github.com/GoogleChrome/lighthouse-ci/issues/172
- uses: technote-space/get-diff-action@v6
Expand All @@ -29,7 +32,8 @@ jobs:
if: steps.git-diff.outputs.diff
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: ${{ matrix.php }}
coverage: none
- name: Cache Composer packages
if: steps.git-diff.outputs.diff
uses: actions/cache@v3
Expand All @@ -39,7 +43,7 @@ jobs:
- name: Install Dependencies
if: steps.git-diff.outputs.diff
run: composer install -q --no-dev --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
if: steps.git-diff.outputs.diff
with:
node-version-file: ".nvmrc"
Expand Down Expand Up @@ -78,7 +82,7 @@ jobs:
DB_HOST: localhost
- name: Use Node from .nvmrc file
if: steps.git-diff.outputs.diff
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Run Lighthouse CI
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/mirror-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -31,4 +31,5 @@ jobs:
- name: Push to GitLab
run: |
ssh-keyscan git.kube.v1.colab.coop >> ~/.ssh/known_hosts
git pull gitlab development
git push gitlab dev:development
3 changes: 2 additions & 1 deletion .github/workflows/mirror-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -31,4 +31,5 @@ jobs:
- name: Push to GitLab
run: |
ssh-keyscan git.kube.v1.colab.coop >> ~/.ssh/known_hosts
git pull gitlab production
git push gitlab production:production
3 changes: 2 additions & 1 deletion .github/workflows/mirror-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -31,4 +31,5 @@ jobs:
- name: Push to GitLab
run: |
ssh-keyscan git.kube.v1.colab.coop >> ~/.ssh/known_hosts
git pull gitlab staging
git push gitlab staging:staging
2 changes: 1 addition & 1 deletion .github/workflows/mirror-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 2 additions & 0 deletions .kube/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install -j$(nproc) gd
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath bz2 zip soap
RUN docker-php-ext-install opcache
RUN docker-php-ext-configure intl
RUN docker-php-ext-install intl

RUN apt-get install -y libmagickwand-dev --no-install-recommends

Expand Down
3 changes: 3 additions & 0 deletions .kube/app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ flock -n -E 0 /opt/data -c "php artisan deploy:global" # run exclusively on a si
## fix permissions after syncing to existing storage and cache https://github.com/accessibility-exchange/platform/issues/1236
chown -R www-data:root /app/bootstrap/cache $FILES_PATH # $CACHE_PATH removed per and added path to cache in the pod https://github.com/accessibility-exchange/platform/issues/1596

# Generate the robots.txt and sitemap.xml files
php artisan seo:generate

/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
1 change: 1 addition & 0 deletions .kube/app/values.development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:
SAIL_XDEBUG_MODE: "develop,debug,coverage"
FILES_PATH: "/opt/data/storage"
VIEW_COMPILED_PATH: "/app/bootstrap/views"
MINIO_DRIVER: "s3"

# CACHE_PATH: "/opt/data/cache" removed per https://github.com/accessibility-exchange/platform/issues/1596
### Place those values in Vault
Expand Down
13 changes: 5 additions & 8 deletions .kube/app/values.production.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
hosts:
- future.accessibilityexchange.ca
auth:
- username: colab
password: colab
- username: tae
password: tae
- accessibilityexchange.ca
disks:
- size: 10Gi
name: accessibility-app-data
env:
APP_NAME: "The Accessibility Exchange"
APP_ENV: "production"
APP_DEBUG: "false"
APP_URL: "https://future.accessibilityexchange.ca"
APP_SERVICE: "future.accessibilityexchange.ca"
APP_URL: "https://accessibilityexchange.ca"
APP_SERVICE: "accessibilityexchange.ca"
LOG_CHANNEL: "stack"
LOG_LEVEL: "debug"
BROADCAST_DRIVER: "log"
Expand All @@ -24,6 +19,8 @@ env:
SAIL_XDEBUG_MODE: "develop,debug,coverage"
FILES_PATH: "/opt/data/storage"
VIEW_COMPILED_PATH: "/app/bootstrap/views"
MINIO_DRIVER: "s3"

# CACHE_PATH: "/opt/data/cache" removed per https://github.com/accessibility-exchange/platform/issues/1596
### Place those values in Vault
# secrets:
Expand Down
2 changes: 2 additions & 0 deletions .kube/app/values.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ env:
SAIL_XDEBUG_MODE: "develop,debug,coverage"
FILES_PATH: "/opt/data/storage"
VIEW_COMPILED_PATH: "/app/bootstrap/views"
MINIO_DRIVER: "s3"

# CACHE_PATH: "/opt/data/cache" removed per https://github.com/accessibility-exchange/platform/issues/1596
### Place those values in Vault
# secrets:
Expand Down
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"plugins": [
"@shufo/prettier-plugin-blade"
],
"overrides": [
{
"files": [
Expand Down
Loading

0 comments on commit db150b3

Please sign in to comment.