Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jxjj committed Jul 14, 2022
2 parents 3da1c13 + 8fd4671 commit e19b899
Show file tree
Hide file tree
Showing 407 changed files with 30,329 additions and 25,760 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2

[*.php]
indent_size = 4
68 changes: 68 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
APP_NAME=Camino
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_PORT=8000
WEB_PORT=80
WEB_SSL_PORT=443

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=camino
DB_USERNAME=sail
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=memcached

REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="UMN Camino"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

SHIB_EMULATE=true
DEBUGBAR_ENABLED=false

MAPBOX_ACCESS_TOKEN=

# Camino Trekker
MIX_APP_URL="${APP_URL}"
MIX_TREKKER_BASE_DIR=/trekker/
MIX_MAPBOX_ACCESS_TOKEN="${MAPBOX_ACCESS_TOKEN}"

# Xdebug
# SAIL_XDEBUG_MODE=develop,debug,coverage
71 changes: 71 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
env: {
browser: true,
es2021: true,
node: true,
jest: true,
"vue/setup-compiler-macros": true,
},
extends: [
"eslint:recommended",
"plugin:vue/vue3-recommended",
"@vue/eslint-config-typescript/recommended",
"plugin:cypress/recommended",
"prettier",
],
parserOptions: {
ecmaVersion: 13,
sourceType: "module",
},
plugins: ["vue"],
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"vue/multi-word-component-names": "off",
// prevents vars used in `<script setup>` from being reported as unused
// can be removed once https://github.com/vuejs/eslint-config-typescript/pull/42 is merged into eslint-config-typescript
"vue/script-setup-uses-vars": "error",
"vue/attribute-hyphenation": ["error", "never"],
"vue/v-on-event-hyphenation": ["error", "never"],
"vue/component-definition-name-casing": "off",
"vue/component-name-in-template-casing": [
"warn",
"PascalCase",
{
registeredComponentsOnly: false,
ignores: [
"component",
"client-only",
"keep-alive",
"router-link",
"router-view",
"teleport",
"a-scene",
"a-text",
"a-camera",
],
},
],
},
ignorePatterns: ["**/vendor/**/*.js", "**/public/**/*.js"],
globals: {
axios: true,
Echo: true,
L: true, // leaflet
},
overrides: [
// cypress should only be linted in cypress/
{
files: ["**/cypress/**/*.[jt]s"],
extends: ["plugin:cypress/recommended"],
},
// this keeps jest from linting cypress files
{
files: ["**/resources/**/*.[jt]s"],
extends: ["plugin:jest/recommended", "plugin:jest/style"],
},
],
};
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Basic set up for three package managers

version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"

# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
99 changes: 99 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: CI

on: [push, pull_request]

env:
WWWGROUP: 1000
WWWUSER: 1000
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- run: cp .env.example .env

- name: Setup PHP 8.1 to match server
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"

- name: Install PHP dependencies
run: composer install --no-interaction --prefer-dist --ignore-platform-reqs

- name: make test certs
run: |
mkdir .cert
echo "${{ secrets.TEST_CERT_PEM_BASE64 }}" | base64 -d > .cert/cert.pem
echo "${{ secrets.TEST_KEY_PEM_BASE64 }}" | base64 -d > .cert/key.pem
- name: Build
run: docker compose build

- name: Start
run: docker compose up -d

- name: Check service status
run: docker compose ps --all

- name: Install JS dependencies
run: yarn && yarn prod

- name: Laravel Setup
run: |
docker compose exec -T laravel.test ./bin/ci.sh
docker compose exec -T laravel.test php artisan migrate:fresh --seed
- name: Set ownership
run: |
docker compose exec -T laravel.test chown -R $WWWUSER:$WWWGROUP storage
# - name: Lint code
# run: yarn lint

- name: Run unit tests with Jest
run: yarn jest

- name: Run E2E tests with Cypress
uses: cypress-io/github-action@v2
with:
wait-on: "https://localhost"
browser: chrome
config: baseUrl=https://localhost
env:
NODE_TLS_REJECT_UNAUTHORIZED: 0

## Grab any useful artifacts before exiting
- name: Upload test screenshots if any
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots

- name: Upload snapshots
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-snapshots
path: cypress/snapshots

- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: "./storage/logs"

- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./storage/logs

- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/node_modules
/public/hot
/public/storage
/public/*/*
!/public/images/*
/public/images/vendor
!/public/umn/*
/storage/*.key
/vendor
.env
Expand All @@ -13,3 +15,6 @@ yarn-error.log
/public/js
/public/css
docs/.vuepress/dist
mix-manifest.json
/.cert
/cypress/support/routes.json
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/vendor
/node_modules
/public
/storage
/docs
dist
.cache
.temp
/cypress/**/examples
/cypress/**/routes.json
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit e19b899

Please sign in to comment.