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

Commit

Permalink
Spero di non sminchiare tutto
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzodeinegri committed Mar 19, 2020
1 parent 8743e07 commit abf4089
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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: 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-suggest --no-progress --prefer-dist
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: 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 }}

0 comments on commit abf4089

Please sign in to comment.