Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #10 from RedRoundRobin/develop
Browse files Browse the repository at this point in the history
Incremento 7
  • Loading branch information
Maxelweb committed Mar 26, 2020
2 parents 88bd7bf + 41e4dd7 commit 62c07f4
Show file tree
Hide file tree
Showing 104 changed files with 43,672 additions and 5,297 deletions.
8 changes: 8 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": [["env", { "modules": false }]],
"env": {
"test": {
"presets": [["env", { "targets": { "node": "current" } }]]
}
}
}
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage_clover:
- build/logs/clover.xml
- coverage/clover.xml
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=sqlite

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
Expand Down
29 changes: 29 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"extends": [
"plugin:vue/recommended",
"google",
"prettier",
"prettier/vue",
"plugin:prettier/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"plugins": [
"vue",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"no-invalid-this": "warn"
}
}
82 changes: 82 additions & 0 deletions .github/workflows/checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: SWE Web App CI

on:
push:
branches:
- develop
- master
- feature/**
pull_request:
branches:
- develop
- master
- feature/**

jobs:
laravel-tests:

runs-on: ubuntu-latest

steps:
- name: Checkout repo content
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Run dependencies installation
run: npm ci
# - name: Run project formatter and linter
# run: npm run prettier-eslint
- name: Check project formatter and linter
run: npm run prettier-eslint-check
# - name: Run project formatter and linter for tests
# run: npm run prettier-eslint-test
- name: Check project formatter and linter for tests
run: npm run prettier-eslint-test-check
- name: Run project build
run: npm run build --if-present
- name: Run project test
run: npm test
env:
CI: true
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: touch database/database.sqlite
# - name: Run code style fixer
# run: vendor/bin/phpcbf -n
- name: Run code style sniffer
run: vendor/bin/phpcs -s
# - name: Run code style fixer
# run: vendor/bin/php-cs-fixer fix --config=.php_cs.php --diff -vvv
- name: Run code style checker
run: vendor/bin/php-cs-fixer fix --config=.php_cs.php --dry-run -vvv
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit -c phpunit.xml
- name: Report to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_LARAVEL }}
run: vendor/bin/php-coveralls -v
- name: Slack Notification
uses: homoluctus/slatify@v2.0.1
if: failure()
with:
type: ${{ job.status }}
job_name: 'CI Check'
mention: 'here'
mention_if: 'failure'
channel: '#devops_software'
username: 'CI Checker'
url: ${{ secrets.SLACK_SW_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/repo-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Repository Checker

on: [push, pull_request]

jobs:
repo_checker:
runs-on: ubuntu-latest
steps:

- name: Checkout repository contents
uses: actions/checkout@v2

- name: Checking for .DS_Store files
uses: Maxelweb/ds-store-patrol@v1

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: LICENSE, README.md, .gitignore"

- name: File exists
if: steps.check_files.outputs.files_exists == 'true'
run: echo All files exists! Thanks god.

- name: Slack Notification
uses: homoluctus/slatify@v2.0.1
if: failure()
with:
type: ${{ job.status }}
job_name: 'Repo check'
mention: 'here'
mention_if: 'failure'
channel: '#devops_repositories'
username: 'Repo checker'
url: ${{ secrets.SLACK_REPO_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
.idea/*
build/*
node_modules/*
vendor/*
.idea/*
coverage/*

public/css
public/js
public/webfonts
public/mix-manifest.json

composer.lock
package-lock.json

.php_cs.cache
5 changes: 5 additions & 0 deletions .php_cs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

$finder = PhpCsFixer\Finder::create()->in(['./app', './config', './routes', './tests']);

return PhpCsFixer\Config::create()->setRules(['@PSR1' => true, '@PSR2' => true])->setFinder($finder);
16 changes: 16 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<ruleset name="SWEWebAppStandard" namespace="SWE\WebApp\CS\Standard">
<description>The coding standard for the swe web app PHP_CodeSniffer itself.</description>

<file>./app</file>
<file>./config</file>
<file>./routes</file>
<file>./tests</file>

<arg name="basepath" value="."/>
<arg value="sp"/>

<rule ref="PSR1"/>
<rule ref="PSR2"/>
<rule ref="PSR12"/>
</ruleset>
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
Avvio:
![RedRounRobinLogo](https://i.imgur.com/3Dcv4vs.png)

# Web application - ThiReMa

:fire: Versione componente: `v0.0.1-dev`

:pushpin: Main repo: [swe-thirema](https://github.com/Maxelweb/swe-thirema)

---

### Installazione e primo avvio

1. composer update
2. npm update
3. php artisan migrate:fresh
4. php artisan serve
5. npm run dev
4. npm run dev
5. php artisan serve
16 changes: 16 additions & 0 deletions __tests__/ChartManagement.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
window.axios = require("axios");

import { mount } from "@vue/test-utils";
import ChartManagement from "../resources/js/components/ChartManagement.vue";

describe("ChartManagement", () => {
test("is a Vue instance", () => {
const user = {};
const device = {};
const sensor = { sensorId: 1 };
const chart = mount(ChartManagement, {
propsData: { user, device, sensor },
});
expect(chart.isVueInstance()).toBeTruthy();
});
});
6 changes: 6 additions & 0 deletions __tests__/app.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require("../resources/js/app");

test("is a Vue instance", () => {
const num = 4;
expect(num).toBe(4);
});
8 changes: 8 additions & 0 deletions __tests__/sb-admin-2.text.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
window.jQuery = require("jquery");

require("../resources/js/sb-admin-2");

test("is a Vue instance", () => {
const num = 4;
expect(num).toBe(4);
});
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function schedule(Schedule $schedule)
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
$this->load(__DIR__ . '/Commands');

require base_path('routes/console.php');
}
Expand Down
11 changes: 0 additions & 11 deletions app/Device.php

This file was deleted.

81 changes: 0 additions & 81 deletions app/Http/Controllers/APIController.php

This file was deleted.

Loading

0 comments on commit 62c07f4

Please sign in to comment.