Feature/cypress menubar test + dependency updates (#1031) #429
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: 'unstable' | |
on: | |
push: | |
branches: [ 'main' ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: | |
- "8.1" | |
services: | |
db-tests: | |
image: 'mysql/mysql-server:8.0' | |
env: | |
MYSQL_ROOT_PASSWORD: yap_root_password | |
MYSQL_DATABASE: yap_test | |
MYSQL_ROOT_HOST: '%' | |
ports: | |
- 3106:3306 | |
steps: | |
- uses: actions/checkout@v4 | |
id: code-checkout | |
- name: Setup PHP | |
uses: ./.github/actions/setup-php | |
- name: Install Dependencies | |
uses: ./.github/actions/install-deps | |
- name: Lint | |
uses: ./.github/actions/lint | |
- name: Test w/Coverage | |
uses: ./.github/actions/test-coverage | |
env: | |
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }} | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
package: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: | |
- "8.1" | |
permissions: | |
id-token: write | |
contents: write | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
needs: [ lint ] | |
steps: | |
- uses: actions/checkout@v4 | |
id: code-checkout | |
- name: Setup PHP | |
uses: ./.github/actions/setup-php | |
- name: Install Dependencies | |
uses: ./.github/actions/install-deps | |
- name: Build package | |
id: build-package | |
run: | | |
cd src | |
export ARTIFACT_FILE=yap-${GITHUB_RUN_NUMBER}-${GITHUB_SHA} | |
export ARTIFACT_FILENAME=${ARTIFACT_FILE}.zip | |
echo "ARTIFACT_FILENAME=${ARTIFACT_FILENAME}" >> $GITHUB_ENV | |
git archive --format=zip --output=${ARTIFACT_FILENAME} --prefix=${ARTIFACT_FILE}/ HEAD | |
DISABLE_NOTIFIER=true make deploy | |
unzip ${ARTIFACT_FILENAME} | |
rm ${ARTIFACT_FILENAME} | |
echo ${GITHUB_SHA} > ${ARTIFACT_FILE}/storage/app/build.txt | |
cp -R vendor ${ARTIFACT_FILE}/ | |
cp ../LICENSE . | |
cp ../RELEASENOTES.md . | |
mkdir -p ${ARTIFACT_FILE}/public/dist && cp -R public/dist/. ${ARTIFACT_FILE}/public/dist | |
find ./${ARTIFACT_FILE} -type d | xargs chmod 755 | |
find ./${ARTIFACT_FILE} -name '*.php' | xargs chmod 644 | |
zip -r -9 ${ARTIFACT_FILENAME} ${ARTIFACT_FILE} | |
mkdir artifacts/ | |
mv ${ARTIFACT_FILENAME} artifacts/ | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions/gh-ci-s3-artifact | |
role-session-name: gh-actions-jft | |
aws-region: us-east-1 | |
- name: copy artifact to s3 | |
run: | | |
aws s3 cp src/artifacts/${ARTIFACT_FILENAME} s3://${{ secrets.S3_BUCKET }}/yap/${ARTIFACT_FILENAME} |