Skip to content

Bump sass from 1.94.0 to 1.94.1 #733

Bump sass from 1.94.0 to 1.94.1

Bump sass from 1.94.0 to 1.94.1 #733

Workflow file for this run

name: Run unit tests
on:
pull_request_target:
types: [ opened, synchronize, reopened, closed ]
branches:
- master
- develop
jobs:
tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: hackgreenville
MYSQL_USER: hackgreenville
MYSQL_ROOT_PASSWORD: test
MYSQL_PASSWORD: test
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # Important: test the actual PR code
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: :php_psr
- name: copy environment variables to .env
run: cp .env.ci .env
- name: install php dependencies
run: composer install
- name: install node dependencies
run: yarn install
- name: migrate database
run: php artisan migrate --seed
- name: Build website
run: yarn build
- name: run tests
run: php artisan test
pr_opened:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
needs: tests
environment:
name: pr-preview
url: ${{ steps.get_url.outputs.deployment_url }}
container: ghcr.io/railwayapp/cli:latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Link to project
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: railway link --project ${{ secrets.RAILWAY_PROJECT_ID }} --environment ${{ secrets.RAILWAY_ENVIRONMENT_ID }}
- name: Create Railway Environment for PR
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: railway environment new pr-${{ github.event.pull_request.number }} --copy ${{ secrets.RAILWAY_ENVIRONMENT_ID }}
- name: Deploy to new environment
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: |
railway link --project ${{ secrets.RAILWAY_PROJECT_ID }} --environment pr-${{ github.event.pull_request.number }} --service hackgreenville.com
railway up --detach --service hackgreenville.com
- name: Get deployment URL
id: get_url
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: |
sleep 30
URL=$(railway domain | grep -oE 'https://[^ ]+' | head -1)
echo "deployment_url=$URL" >> $GITHUB_OUTPUT
pr_updated:
if: (github.event.action == 'synchronize' || github.event.action == 'reopened')
runs-on: ubuntu-latest
needs: tests
environment:
name: pr-preview
url: ${{ steps.get_url.outputs.deployment_url }}
container: ghcr.io/railwayapp/cli:latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check and create environment if needed
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: |
railway link --project ${{ secrets.RAILWAY_PROJECT_ID }} --environment pr-${{ github.event.pull_request.number }} || \
(railway link --project ${{ secrets.RAILWAY_PROJECT_ID }} --environment ${{ secrets.RAILWAY_ENVIRONMENT_ID }} && \
railway environment new pr-${{ github.event.pull_request.number }} --copy ${{ secrets.RAILWAY_ENVIRONMENT_ID }})
- name: Deploy to Railway Environment
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: |
railway link --project ${{ secrets.RAILWAY_PROJECT_ID }} --environment pr-${{ github.event.pull_request.number }} --service hackgreenville.com
railway up --detach --service hackgreenville.com
- name: Get deployment URL
id: get_url
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: |
sleep 30
URL=$(railway domain | grep -oE 'https://[^ ]+' | head -1)
echo "deployment_url=$URL" >> $GITHUB_OUTPUT
pr_closed:
if: github.event.action == 'closed'
runs-on: ubuntu-latest
container: ghcr.io/railwayapp/cli:latest
steps:
- name: Link to project
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: railway link --project ${{ secrets.RAILWAY_PROJECT_ID }} --environment ${{ secrets.RAILWAY_ENVIRONMENT_ID }} --service hackgreenville.com
- name: Delete Railway Environment for PR
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_API_TOKEN }}
run: railway environment delete pr-${{ github.event.pull_request.number }} --yes || true