Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 39
Add github actions testing#109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
f456c6b1fc41da89f62bab56de152acc3e7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: Dependabot auto approve | ||
| on: pull_request | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: hmarr/auto-approve-action@v2.0.0 | ||
| if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' | ||
| with: | ||
| github-token: "${{ secrets.GITHUB_TOKEN }}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Lint | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
| - stable* | ||
| jobs: | ||
| php: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| php-versions: ['7.2', '7.3', '7.4'] | ||
| name: php${{ matrix.php-versions }} lint | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Set up php${{ matrix.php-versions }} | ||
| uses: shivammathur/setup-php@v1 | ||
| with: | ||
| php-version: ${{ matrix.php-versions }} | ||
| coverage: none | ||
| - name: Lint | ||
| run: composer run lint | ||
| node: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [12.x] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use node ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: ESLint | ||
| run: npm run lint |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Node | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
| - stable* | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [12.x] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use node ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - name: Install dependencies & build | ||
| run: | | ||
| npm ci | ||
| npm run build --if-present | ||
| - name: Check webpack build changes | ||
| run: | | ||
| bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && git status && exit 1 )" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,191 @@ | ||
| name: PHPUnit | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
| - stable* | ||
| jobs: | ||
| php: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| # do not stop on another job's failure | ||
| fail-fast: false | ||
| matrix: | ||
| php-versions: ['7.2', '7.3', '7.4'] | ||
| databases: ['sqlite'] | ||
| server-versions: ['master'] | ||
| name: php${{ matrix.php-versions }}/${{ matrix.databases }} on ${{ matrix.server-versions }} | ||
| steps: | ||
| - name: Checkout server | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| repository: nextcloud/server | ||
| ref: test/debug-install | ||
| - name: Checkout submodules | ||
| shell: bash | ||
| run: | | ||
| auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
| git submodule sync --recursive | ||
| git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | ||
| - name: Checkout app | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| path: apps/notestutorial | ||
| - name: Set up php${{ matrix.php-versions }} | ||
| uses: shivammathur/setup-php@v1 | ||
| with: | ||
| php-version: ${{ matrix.php-versions }} | ||
| tools: phpunit | ||
| extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite | ||
| coverage: none | ||
| - name: Set up nextcloud | ||
| env: | ||
| DB_PORT: 4444 | ||
| run: | | ||
| mkdir data | ||
| ./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password | ||
| ./occ app:enable notestutorial | ||
| php -S localhost:8080 & | ||
| - name: PHPUnit | ||
| working-directory: apps/notestutorial | ||
| run: phpunit -c phpunit.xml | ||
| - name: PHPUnit integration | ||
| working-directory: apps/notestutorial | ||
| run: phpunit -c phpunit.integration.xml | ||
| mysql: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| # do not stop on another job's failure | ||
| fail-fast: false | ||
| matrix: | ||
| php-versions: ['7.2', '7.3', '7.4'] | ||
| databases: ['mysql'] | ||
| server-versions: ['master'] | ||
| name: php${{ matrix.php-versions }}/${{ matrix.databases }} on ${{ matrix.server-versions }} | ||
| services: | ||
| mysql: | ||
| image: mariadb | ||
| ports: | ||
| - 4444:3306/tcp | ||
| env: | ||
| MYSQL_ROOT_PASSWORD: rootpassword | ||
| options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5 | ||
| steps: | ||
| - name: Checkout server | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| repository: nextcloud/server | ||
| ref: test/debug-install | ||
| - name: Checkout submodules | ||
| shell: bash | ||
| run: | | ||
| auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
| git submodule sync --recursive | ||
| git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | ||
| - name: Checkout app | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| path: apps/notestutorial | ||
| - name: Set up php${{ matrix.php-versions }} | ||
| uses: shivammathur/setup-php@v1 | ||
| with: | ||
| php-version: ${{ matrix.php-versions }} | ||
| tools: phpunit | ||
| extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql | ||
| coverage: none | ||
| - name: Set up nextcloud | ||
| env: | ||
| DB_PORT: 4444 | ||
| run: | | ||
| mkdir data | ||
| ./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password | ||
skjnldsv marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ./occ app:enable notestutorial | ||
| php -S localhost:8080 & | ||
| - name: PHPUnit | ||
| working-directory: apps/notestutorial | ||
| run: phpunit -c phpunit.xml | ||
| - name: PHPUnit integration | ||
| working-directory: apps/notestutorial | ||
| run: phpunit -c phpunit.integration.xml | ||
| pgsql: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| # do not stop on another job's failure | ||
| fail-fast: false | ||
| matrix: | ||
| php-versions: ['7.2', '7.3', '7.4'] | ||
| databases: ['pgsql'] | ||
| server-versions: ['master'] | ||
| name: php${{ matrix.php-versions }}/${{ matrix.databases }} on ${{ matrix.server-versions }} | ||
| services: | ||
| postgres: | ||
| image: postgres | ||
| ports: | ||
| - 4444:5432/tcp | ||
| env: | ||
| POSTGRES_USER: root | ||
| POSTGRES_PASSWORD: rootpassword | ||
| POSTGRES_DB: nextcloud | ||
| options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5 | ||
| steps: | ||
| - name: Checkout server | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| repository: nextcloud/server | ||
| ref: test/debug-install | ||
| - name: Checkout submodules | ||
| shell: bash | ||
| run: | | ||
| auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
| git submodule sync --recursive | ||
| git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | ||
| - name: Checkout app | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| path: apps/notestutorial | ||
| - name: Set up php${{ matrix.php-versions }} | ||
| uses: shivammathur/setup-php@v1 | ||
| with: | ||
| php-version: ${{ matrix.php-versions }} | ||
| tools: phpunit | ||
| extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql | ||
| coverage: none | ||
| - name: Set up nextcloud | ||
| env: | ||
| DB_PORT: 4444 | ||
| run: | | ||
| mkdir data | ||
| ./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password | ||
| ./occ app:enable notestutorial | ||
| php -S localhost:8080 & | ||
| - name: PHPUnit | ||
| working-directory: apps/notestutorial | ||
| run: phpunit -c phpunit.xml | ||
| - name: PHPUnit integration | ||
| working-directory: apps/notestutorial | ||
| run: phpunit -c phpunit.integration.xml | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -26,7 +26,7 @@ else | ||
| endif | ||
| npm-init: | ||
| npm install | ||
| npm ci | ||
| npm-update: | ||
| npm update | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.