Remove localization, set english as default #232
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Test & Deploy | |
on: | |
pull_request: | |
branches: [ master ] | |
push: | |
branches: [ master ] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
environment: Build | |
steps: | |
# - name: Setup Chrome | |
# uses: browser-actions/[email protected] | |
- name: Docker Login | |
uses: docker/[email protected] | |
with: | |
# Username used to login to the Docker registry | |
username: esacci | |
# Password or personal access token used to login to the Docker registry | |
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | |
- uses: shivammathur/[email protected] | |
with: | |
php-version: '8.1' | |
- uses: actions/checkout@v2 | |
- name: Setup MySQL | |
uses: mirromutth/[email protected] | |
with: | |
# The port of host | |
host port: 3306 | |
# The port of container | |
container port: 3306 | |
# Version of MySQL to use | |
mysql version: 5.7 | |
mysql database: esac | |
mysql user: mysql | |
mysql password: mysql | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 16 | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Install Dependencies | |
run: | | |
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
npm install | |
npm install -g @lhci/[email protected] | |
- name: PHP artisan meuk | |
run: | | |
export CHROME_VERSION=$(/usr/bin/google-chrome --version | cut -c15-17) | |
echo $CHROME_VERSION | |
echo "php artisan dusk:chrome-driver $CHROME_VERSION" | |
php -r "putenv('DB_DATABASE=esac');" | |
php artisan key:generate | |
php artisan storage:link | |
php artisan dusk:chrome-driver $CHROME_VERSION | |
php artisan migrate | |
php artisan db:seed | |
php artisan serve & | |
env: | |
DB_DATABASE: esac | |
DB_USERNAME: mysql | |
DB_PASSWORD: mysql | |
- name: NPM build | |
run: npm run prod | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
env: | |
DB_DATABASE: esac | |
DB_USERNAME: mysql | |
DB_PASSWORD: mysql | |
CHROMIUM_BIN: $(which chrome) | |
run: vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml | |
- name: Upload to codecov | |
run: bash <(curl -s https://codecov.io/bash) | |
- name: Build and push Docker images | |
uses: docker/[email protected] | |
with: | |
push: true | |
tags: esac/website:${{ github.run_number }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: laravel-tests | |
# Only execute deploy when a push to master is made. | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
steps: | |
- name: SSH Command | |
uses: D3rHase/[email protected] | |
with: | |
HOST: ${{ secrets.SSH_HOST }} | |
USER: ic | |
PRIVATE_SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
COMMAND: ./update.sh website "${{ github.run_number }}" "${{ github.event.pusher.name }}" "${{ github.event.head_commit.message }}" "${{ github.event.head_commit.timestamp }}" "${{ github.ref }}" |