generated from biigle/module
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 69c06f6
Showing
25 changed files
with
19,910 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2020": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:vue/essential" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 11, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"vue" | ||
], | ||
"rules": { | ||
"no-prototype-builtins": "off", | ||
"no-console": ["error", {"allow": ["warn", "error"]}], | ||
"vue/require-v-for-key": "off" | ||
}, | ||
"globals": { | ||
"biigle": "readonly", | ||
"Vue": "readonly" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set registry authentication token | ||
run: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run ESLint | ||
run: npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test-module: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
MODULE_NAME: Module | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/checkout@v1 | ||
with: | ||
repository: biigle/core | ||
ref: master | ||
fetch-depth: 1 | ||
path: core | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
working-directory: ../core | ||
|
||
- name: Copy .env | ||
run: cp .env.example .env | ||
working-directory: ../core | ||
|
||
- name: Set testing key | ||
run: echo "APP_KEY=base64:STZFA4bQKDjE2mlpRPmsJ/okG0eCh4RHd9BghtZeYmQ=" >> .env | ||
working-directory: ../core | ||
|
||
- name: Install Dependencies | ||
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist --ignore-platform-reqs | ||
working-directory: ../core | ||
|
||
- name: Install current repository | ||
run: | | ||
composer config repositories.module --json '{"type": "path", "url": "'${GITHUB_WORKSPACE}'", "options": {"symlink": false}}' | ||
composer require --no-ansi --no-interaction --no-scripts --ignore-platform-reqs ${GITHUB_REPOSITORY}:@dev | ||
sed -i "/Insert Biigle module service providers/i Biigle\\\\Modules\\\\${MODULE_NAME}\\\\${MODULE_NAME}ServiceProvider::class," config/app.php | ||
mkdir -p tests/php/Modules | ||
ln -sf ../../../vendor/${GITHUB_REPOSITORY}/tests tests/php/Modules/${MODULE_NAME} | ||
working-directory: ../core | ||
|
||
- name: Fetch base images | ||
run: | | ||
docker pull ghcr.io/biigle/app:latest | ||
docker pull ghcr.io/biigle/worker:latest | ||
- name: Start test database | ||
run: docker-compose up -d --no-build database_testing && sleep 5 | ||
working-directory: ../core | ||
|
||
- name: Run tests | ||
run: docker-compose run --rm -u 1001 worker php -d memory_limit=1G vendor/bin/phpunit --random-order --filter 'Biigle\\Tests\\Modules\\'${MODULE_NAME} | ||
working-directory: ../core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/vendor | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@mzur:registry=https://npm.pkg.github.com |
Oops, something went wrong.