Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 81a28a9

Browse files
committed
[CI] Refactor from Travis -> Github Actions
1 parent 4a091cb commit 81a28a9

50 files changed

Lines changed: 330 additions & 161 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
name: Laravel
1+
name: CI - Dusk / Browser
22

3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
3+
on: workflow_dispatch
84

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

.github/workflows/ci-ex-dusk.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI (exc. Dusk/Browser)
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
ci-ex-dusk:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
12+
with:
13+
php-version: '8.0'
14+
- uses: actions/checkout@v2
15+
- uses: shogo82148/actions-setup-mysql@v1
16+
with:
17+
mysql-version: '8.0'
18+
- run: mysql -uroot -h127.0.0.1 -e 'CREATE DATABASE myapp_test'
19+
- name: Copy .env
20+
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
21+
- name: Install bgpq3
22+
run: sudo apt-get install bgpq3
23+
- name: Install Dependencies
24+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
25+
- name: Directory Permissions
26+
run: chmod -R 777 storage bootstrap/cache
27+
- name: Create Database
28+
run: |
29+
cat data/ci/ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u root myapp_test
30+
- name: Set up php server
31+
run: |
32+
php ./artisan serve &>php-built-in.log &
33+
- name: Execute tests (Unit and Feature tests) via PHPUnit
34+
run: vendor/bin/phpunit --testsuite 'Docstore Test Suite,IXP Manager Test Suite'
35+

.idea/IXP-Manager.iml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Utils/Export/JsonSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ private function getMemberInfo( string $version, bool $detailed, bool $tags ): a
482482
if( $tags ) {
483483
$memberinfo[ $cnt ][ 'ixp_manager' ][ 'tags' ] = [];
484484
foreach( $c->tags as $tag ) {
485-
if( !$tag->internal_only || ( Auth::check() && Auth::user()->isSuperUser ) ) {
485+
if( !$tag->internal_only || ( Auth::check() && Auth::user()->isSuperUser() ) ) {
486486
$memberinfo[ $cnt ][ 'ixp_manager' ][ 'tags' ][ $tag->tag ] = $tag->display_as;
487487
}
488488
}

data/travis-ci/known-good/api-v4-member-export-0.6-auth.json renamed to data/ci/known-good/api-v4-member-export-0.6-auth.json

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "0.6",
33
"generator": "IXP Manager v999.9.9",
4-
"timestamp": "2018-06-19T13:57:26Z",
4+
"timestamp": "2021-09-20T09:14:25Z",
55
"ixp_list": [
66
{
77
"shortname": "Infrastructure #1",
@@ -87,7 +87,10 @@
8787
""
8888
],
8989
"ixp_manager": {
90-
"tags": []
90+
"tags": [],
91+
"in_manrs": false,
92+
"is_reseller": false,
93+
"is_resold": false
9194
},
9295
"connection_list": [
9396
{
@@ -129,9 +132,11 @@
129132
],
130133
"ixp_manager": {
131134
"tags": {
132-
"test-tag1": "Test Tag1",
133-
"test-tag2": "Test Tag2"
134-
}
135+
"test-tag1": "Test Tag1"
136+
},
137+
"in_manrs": false,
138+
"is_reseller": false,
139+
"is_resold": false
135140
},
136141
"connection_list": [
137142
{
@@ -192,7 +197,10 @@
192197
""
193198
],
194199
"ixp_manager": {
195-
"tags": []
200+
"tags": [],
201+
"in_manrs": false,
202+
"is_reseller": false,
203+
"is_resold": false
196204
},
197205
"connection_list": [
198206
{
@@ -275,9 +283,10 @@
275283
"peering_policy_url": "http:\/\/www.siep.com\/noc\/",
276284
"contact_hours": "24x7",
277285
"ixp_manager": {
278-
"tags": {
279-
"test-tag2": "Test Tag2"
280-
}
286+
"tags": [],
287+
"in_manrs": false,
288+
"is_reseller": false,
289+
"is_resold": false
281290
},
282291
"connection_list": []
283292
},
@@ -297,7 +306,10 @@
297306
"ixp_manager": {
298307
"tags": {
299308
"test-tag1": "Test Tag1"
300-
}
309+
},
310+
"in_manrs": false,
311+
"is_reseller": false,
312+
"is_resold": false
301313
},
302314
"connection_list": [
303315
{

data/travis-ci/known-good/api-v4-member-export-0.6-unauth.json renamed to data/ci/known-good/api-v4-member-export-0.6-unauth.json

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "0.6",
33
"generator": "IXP Manager v999.9.9",
4-
"timestamp": "2018-06-19T13:57:43Z",
4+
"timestamp": "2021-09-20T09:13:50Z",
55
"ixp_list": [
66
{
77
"shortname": "Infrastructure #1",
@@ -81,7 +81,10 @@
8181
"peering_policy": "open",
8282
"member_type": "peering",
8383
"ixp_manager": {
84-
"tags": []
84+
"tags": [],
85+
"in_manrs": false,
86+
"is_reseller": false,
87+
"is_resold": false
8588
},
8689
"connection_list": [
8790
{
@@ -118,7 +121,10 @@
118121
"ixp_manager": {
119122
"tags": {
120123
"test-tag1": "Test Tag1"
121-
}
124+
},
125+
"in_manrs": false,
126+
"is_reseller": false,
127+
"is_resold": false
122128
},
123129
"connection_list": [
124130
{
@@ -173,7 +179,10 @@
173179
"peering_policy": "open",
174180
"member_type": "peering",
175181
"ixp_manager": {
176-
"tags": []
182+
"tags": [],
183+
"in_manrs": false,
184+
"is_reseller": false,
185+
"is_resold": false
177186
},
178187
"connection_list": [
179188
{
@@ -248,7 +257,10 @@
248257
"peering_policy": "mandatory",
249258
"member_type": "ixp",
250259
"ixp_manager": {
251-
"tags": []
260+
"tags": [],
261+
"in_manrs": false,
262+
"is_reseller": false,
263+
"is_resold": false
252264
},
253265
"connection_list": []
254266
},
@@ -262,7 +274,10 @@
262274
"ixp_manager": {
263275
"tags": {
264276
"test-tag1": "Test Tag1"
265-
}
277+
},
278+
"in_manrs": false,
279+
"is_reseller": false,
280+
"is_resold": false
266281
},
267282
"connection_list": [
268283
{

data/travis-ci/known-good/api-v4-member-export-0.7-auth.json renamed to data/ci/known-good/api-v4-member-export-0.7-auth.json

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "0.7",
33
"generator": "IXP Manager v999.9.9",
4-
"timestamp": "2018-06-19T13:57:11Z",
4+
"timestamp": "2021-09-20T09:12:54Z",
55
"ixp_list": [
66
{
77
"shortname": "Infrastructure #1",
@@ -91,7 +91,10 @@
9191
""
9292
],
9393
"ixp_manager": {
94-
"tags": []
94+
"tags": [],
95+
"in_manrs": false,
96+
"is_reseller": false,
97+
"is_resold": false
9598
},
9699
"connection_list": [
97100
{
@@ -133,9 +136,11 @@
133136
],
134137
"ixp_manager": {
135138
"tags": {
136-
"test-tag1": "Test Tag1",
137-
"test-tag2": "Test Tag2"
138-
}
139+
"test-tag1": "Test Tag1"
140+
},
141+
"in_manrs": false,
142+
"is_reseller": false,
143+
"is_resold": false
139144
},
140145
"connection_list": [
141146
{
@@ -196,7 +201,10 @@
196201
""
197202
],
198203
"ixp_manager": {
199-
"tags": []
204+
"tags": [],
205+
"in_manrs": false,
206+
"is_reseller": false,
207+
"is_resold": false
200208
},
201209
"connection_list": [
202210
{
@@ -279,9 +287,10 @@
279287
"peering_policy_url": "http:\/\/www.siep.com\/noc\/",
280288
"contact_hours": "24x7",
281289
"ixp_manager": {
282-
"tags": {
283-
"test-tag2": "Test Tag2"
284-
}
290+
"tags": [],
291+
"in_manrs": false,
292+
"is_reseller": false,
293+
"is_resold": false
285294
},
286295
"connection_list": []
287296
},
@@ -301,7 +310,10 @@
301310
"ixp_manager": {
302311
"tags": {
303312
"test-tag1": "Test Tag1"
304-
}
313+
},
314+
"in_manrs": false,
315+
"is_reseller": false,
316+
"is_resold": false
305317
},
306318
"connection_list": [
307319
{

data/travis-ci/known-good/api-v4-member-export-0.7-unauth.json renamed to data/ci/known-good/api-v4-member-export-0.7-unauth.json

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "0.7",
33
"generator": "IXP Manager v999.9.9",
4-
"timestamp": "2018-06-19T13:57:41Z",
4+
"timestamp": "2021-09-20T09:11:01Z",
55
"ixp_list": [
66
{
77
"shortname": "Infrastructure #1",
@@ -85,7 +85,10 @@
8585
"peering_policy": "open",
8686
"member_type": "peering",
8787
"ixp_manager": {
88-
"tags": []
88+
"tags": [],
89+
"in_manrs": false,
90+
"is_reseller": false,
91+
"is_resold": false
8992
},
9093
"connection_list": [
9194
{
@@ -122,7 +125,10 @@
122125
"ixp_manager": {
123126
"tags": {
124127
"test-tag1": "Test Tag1"
125-
}
128+
},
129+
"in_manrs": false,
130+
"is_reseller": false,
131+
"is_resold": false
126132
},
127133
"connection_list": [
128134
{
@@ -177,7 +183,10 @@
177183
"peering_policy": "open",
178184
"member_type": "peering",
179185
"ixp_manager": {
180-
"tags": []
186+
"tags": [],
187+
"in_manrs": false,
188+
"is_reseller": false,
189+
"is_resold": false
181190
},
182191
"connection_list": [
183192
{
@@ -252,7 +261,10 @@
252261
"peering_policy": "mandatory",
253262
"member_type": "ixp",
254263
"ixp_manager": {
255-
"tags": []
264+
"tags": [],
265+
"in_manrs": false,
266+
"is_reseller": false,
267+
"is_resold": false
256268
},
257269
"connection_list": []
258270
},
@@ -266,7 +278,10 @@
266278
"ixp_manager": {
267279
"tags": {
268280
"test-tag1": "Test Tag1"
269-
}
281+
},
282+
"in_manrs": false,
283+
"is_reseller": false,
284+
"is_resold": false
270285
},
271286
"connection_list": [
272287
{

0 commit comments

Comments
 (0)