Skip to content

Commit

Permalink
[CI] Refactor from Travis -> Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo committed Sep 20, 2021
1 parent 4a091cb commit 81a28a9
Show file tree
Hide file tree
Showing 50 changed files with 330 additions and 161 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/laravel.yml → .github/workflows/ci-dusk.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Laravel
name: CI - Dusk / Browser

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: workflow_dispatch

jobs:
laravel-tests:
Expand Down Expand Up @@ -32,10 +28,12 @@ jobs:
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
cat data/travis-ci/travis_ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u root myapp_test
cat data/ci/ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u root myapp_test
- name: Set up Dusk and php serve
run: |
php ./artisan serve &>php-built-in.log &
google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit
run: vendor/bin/phpunit --testsuite 'Dusk / Browser Test Suite'


35 changes: 35 additions & 0 deletions .github/workflows/ci-ex-dusk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI (exc. Dusk/Browser)

on: [ push, pull_request ]

jobs:
ci-ex-dusk:

runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v2
- uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: '8.0'
- run: mysql -uroot -h127.0.0.1 -e 'CREATE DATABASE myapp_test'
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: Install bgpq3
run: sudo apt-get install bgpq3
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
cat data/ci/ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u root myapp_test
- name: Set up php server
run: |
php ./artisan serve &>php-built-in.log &
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit --testsuite 'Docstore Test Suite,IXP Manager Test Suite'

1 change: 1 addition & 0 deletions .idea/IXP-Manager.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/Utils/Export/JsonSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ private function getMemberInfo( string $version, bool $detailed, bool $tags ): a
if( $tags ) {
$memberinfo[ $cnt ][ 'ixp_manager' ][ 'tags' ] = [];
foreach( $c->tags as $tag ) {
if( !$tag->internal_only || ( Auth::check() && Auth::user()->isSuperUser ) ) {
if( !$tag->internal_only || ( Auth::check() && Auth::user()->isSuperUser() ) ) {
$memberinfo[ $cnt ][ 'ixp_manager' ][ 'tags' ][ $tag->tag ] = $tag->display_as;
}
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.6",
"generator": "IXP Manager v999.9.9",
"timestamp": "2018-06-19T13:57:26Z",
"timestamp": "2021-09-20T09:14:25Z",
"ixp_list": [
{
"shortname": "Infrastructure #1",
Expand Down Expand Up @@ -87,7 +87,10 @@
""
],
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -129,9 +132,11 @@
],
"ixp_manager": {
"tags": {
"test-tag1": "Test Tag1",
"test-tag2": "Test Tag2"
}
"test-tag1": "Test Tag1"
},
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -192,7 +197,10 @@
""
],
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -275,9 +283,10 @@
"peering_policy_url": "http:\/\/www.siep.com\/noc\/",
"contact_hours": "24x7",
"ixp_manager": {
"tags": {
"test-tag2": "Test Tag2"
}
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": []
},
Expand All @@ -297,7 +306,10 @@
"ixp_manager": {
"tags": {
"test-tag1": "Test Tag1"
}
},
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.6",
"generator": "IXP Manager v999.9.9",
"timestamp": "2018-06-19T13:57:43Z",
"timestamp": "2021-09-20T09:13:50Z",
"ixp_list": [
{
"shortname": "Infrastructure #1",
Expand Down Expand Up @@ -81,7 +81,10 @@
"peering_policy": "open",
"member_type": "peering",
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -118,7 +121,10 @@
"ixp_manager": {
"tags": {
"test-tag1": "Test Tag1"
}
},
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -173,7 +179,10 @@
"peering_policy": "open",
"member_type": "peering",
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -248,7 +257,10 @@
"peering_policy": "mandatory",
"member_type": "ixp",
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": []
},
Expand All @@ -262,7 +274,10 @@
"ixp_manager": {
"tags": {
"test-tag1": "Test Tag1"
}
},
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.7",
"generator": "IXP Manager v999.9.9",
"timestamp": "2018-06-19T13:57:11Z",
"timestamp": "2021-09-20T09:12:54Z",
"ixp_list": [
{
"shortname": "Infrastructure #1",
Expand Down Expand Up @@ -91,7 +91,10 @@
""
],
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -133,9 +136,11 @@
],
"ixp_manager": {
"tags": {
"test-tag1": "Test Tag1",
"test-tag2": "Test Tag2"
}
"test-tag1": "Test Tag1"
},
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -196,7 +201,10 @@
""
],
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -279,9 +287,10 @@
"peering_policy_url": "http:\/\/www.siep.com\/noc\/",
"contact_hours": "24x7",
"ixp_manager": {
"tags": {
"test-tag2": "Test Tag2"
}
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": []
},
Expand All @@ -301,7 +310,10 @@
"ixp_manager": {
"tags": {
"test-tag1": "Test Tag1"
}
},
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.7",
"generator": "IXP Manager v999.9.9",
"timestamp": "2018-06-19T13:57:41Z",
"timestamp": "2021-09-20T09:11:01Z",
"ixp_list": [
{
"shortname": "Infrastructure #1",
Expand Down Expand Up @@ -85,7 +85,10 @@
"peering_policy": "open",
"member_type": "peering",
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -122,7 +125,10 @@
"ixp_manager": {
"tags": {
"test-tag1": "Test Tag1"
}
},
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -177,7 +183,10 @@
"peering_policy": "open",
"member_type": "peering",
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down Expand Up @@ -252,7 +261,10 @@
"peering_policy": "mandatory",
"member_type": "ixp",
"ixp_manager": {
"tags": []
"tags": [],
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": []
},
Expand All @@ -266,7 +278,10 @@
"ixp_manager": {
"tags": {
"test-tag1": "Test Tag1"
}
},
"in_manrs": false,
"is_reseller": false,
"is_resold": false
},
"connection_list": [
{
Expand Down
Loading

0 comments on commit 81a28a9

Please sign in to comment.