Skip to content

Commit

Permalink
Merge branch 'dev' into 1902-automate-resetting-dev-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinroman authored Oct 26, 2023
2 parents 3b95fa8 + a20deae commit a535091
Show file tree
Hide file tree
Showing 238 changed files with 5,637 additions and 4,870 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,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
43 changes: 37 additions & 6 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:

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

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

steps:
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
id: git-diff
Expand Down Expand Up @@ -59,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 @@ -71,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
1 change: 1 addition & 0 deletions .github/workflows/mirror-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/mirror-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/mirror-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 3 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 Down
Loading

0 comments on commit a535091

Please sign in to comment.