Skip to content

Commit

Permalink
revert to old workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarGi committed Nov 29, 2023
1 parent 37244fb commit 9b3f265
Show file tree
Hide file tree
Showing 8 changed files with 306 additions and 1,224 deletions.
118 changes: 109 additions & 9 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,120 @@
name: CI

on:
push:
branches:
- "master"
- 'master'
pull_request:
schedule:
- cron: "0 22 * * *" # run at 10 PM UTC
- cron: '0 22 * * *' # run at 10 PM UTC

name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
builds:
uses: ./.github/workflows/shared_workflow.yml
secrets: inherit
with:
branch: master
api-tests:
name: API tests
strategy:
matrix:
nextcloudVersion: [ stable28 ]
phpVersionMajor: [ 8 ]
phpVersionMinor: [ 1 ]
database: [mysql]
runs-on: ubuntu-latest
container:
image: ubuntu:latest
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

defaults:
run:
working-directory: integration_openproject

services:
nextcloud:
image: ghcr.io/juliushaertl/nextcloud-dev-php${{ format('{0}{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}:latest
env:
SQL: ${{ matrix.database }}
SERVER_BRANCH: ${{ matrix.nextcloudVersion }}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS: "viewer activity groupfolders integration_openproject"
NEXTCLOUD_TRUSTED_DOMAINS: nextcloud
VIRTUAL_HOST: "nextcloud"
WITH_REDIS: "YES"
NEXTCLOUD_AUTOINSTALL_APPS_WAIT_TIME: 120
volumes:
- /home/runner/work/integration_openproject/integration_openproject:/var/www/html/apps-shared

database-postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: nextcloud
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

database-mysql:
image: mariadb:10.5
env:
MYSQL_ROOT_PASSWORD: 'nextcloud'
MYSQL_PASSWORD: 'nextcloud'
MYSQL_USER: 'nextcloud'
MYSQL_DATABASE: 'nextcloud'
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

redis:
image: redis:7
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: integration_openproject

- name: Checkout activity app
uses: actions/checkout@v3
with:
repository: nextcloud/activity
path: activity
ref: ${{ matrix.nextcloudVersion }}

- name: Checkout groupfolders app
uses: actions/checkout@v3
with:
repository: nextcloud/groupfolders
path: groupfolders
ref: ${{ matrix.nextcloudVersion }}

- name: Setup PHP ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
tools: composer
extensions: intl

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache PHP dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/integration_openproject/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: API Tests
env:
NEXTCLOUD_BASE_URL: http://nextcloud
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
until curl -s -f http://nextcloud/status.php | grep '"installed":true'; do echo .; sleep 10; done
make api-test
20 changes: 10 additions & 10 deletions .github/workflows/nighlty-ci-release-branch.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Nightly CI Release
# name: Nightly CI Release

on:
schedule:
- cron: '0 22 * * *' # run at 10 PM UTC
# on:
# schedule:
# - cron: '0 22 * * *' # run at 10 PM UTC

jobs:
builds:
uses: ./.github/workflows/shared_workflow.yml
secrets: inherit
with:
branch: release/2.4
# jobs:
# builds:
# uses: ./.github/workflows/shared_workflow.yml
# secrets: inherit
# with:
# branch: release/2.4
214 changes: 107 additions & 107 deletions .github/workflows/shared_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,122 +1,122 @@
on:
workflow_call:
inputs:
branch:
type: string
# on:
# workflow_call:
# inputs:
# branch:
# type: string

name: CI
# name: CI

jobs:
api-tests:
name: API tests
strategy:
matrix:
nextcloudVersion: [ stable28 ]
phpVersionMajor: [ 8 ]
phpVersionMinor: [ 1 ]
database: [mysql]
runs-on: ubuntu-20.04
container:
image: ubuntu:latest
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# jobs:
# api-tests:
# name: API tests
# strategy:
# matrix:
# nextcloudVersion: [ stable28 ]
# phpVersionMajor: [ 8 ]
# phpVersionMinor: [ 1 ]
# database: [mysql]
# runs-on: ubuntu-20.04
# container:
# image: ubuntu:latest
# credentials:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

defaults:
run:
working-directory: integration_openproject
# defaults:
# run:
# working-directory: integration_openproject

services:
nextcloud:
image: ghcr.io/juliushaertl/nextcloud-dev-php${{ format('{0}{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}:latest
env:
SQL: ${{ matrix.database }}
SERVER_BRANCH: ${{ matrix.nextcloudVersion }}
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS: "viewer activity groupfolders integration_openproject"
NEXTCLOUD_TRUSTED_DOMAINS: nextcloud
VIRTUAL_HOST: "nextcloud"
WITH_REDIS: "YES"
NEXTCLOUD_AUTOINSTALL_APPS_WAIT_TIME: 120
volumes:
- /home/runner/work/integration_openproject/integration_openproject:/var/www/html/apps-shared
# services:
# nextcloud:
# image: ghcr.io/juliushaertl/nextcloud-dev-php${{ format('{0}{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}:latest
# env:
# SQL: ${{ matrix.database }}
# SERVER_BRANCH: ${{ matrix.nextcloudVersion }}
# NEXTCLOUD_AUTOINSTALL: "YES"
# NEXTCLOUD_AUTOINSTALL_APPS: "viewer activity groupfolders integration_openproject"
# NEXTCLOUD_TRUSTED_DOMAINS: nextcloud
# VIRTUAL_HOST: "nextcloud"
# WITH_REDIS: "YES"
# NEXTCLOUD_AUTOINSTALL_APPS_WAIT_TIME: 120
# volumes:
# - /home/runner/work/integration_openproject/integration_openproject:/var/www/html/apps-shared

database-postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: nextcloud
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# database-postgres:
# image: postgres:14
# env:
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: nextcloud
# credentials:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

database-mysql:
image: mariadb:10.5
env:
MYSQL_ROOT_PASSWORD: 'nextcloud'
MYSQL_PASSWORD: 'nextcloud'
MYSQL_USER: 'nextcloud'
MYSQL_DATABASE: 'nextcloud'
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# database-mysql:
# image: mariadb:10.5
# env:
# MYSQL_ROOT_PASSWORD: 'nextcloud'
# MYSQL_PASSWORD: 'nextcloud'
# MYSQL_USER: 'nextcloud'
# MYSQL_DATABASE: 'nextcloud'
# credentials:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

redis:
image: redis:7
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# redis:
# image: redis:7
# credentials:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

steps:
- name: Checkout For nightly Branch
if: github.event_name == 'schedule'
uses: actions/checkout@v3
with:
path: integration_openproject
ref: ${{ inputs.branch }}
# steps:
# - name: Checkout For nightly Branch
# if: github.event_name == 'schedule'
# uses: actions/checkout@v3
# with:
# path: integration_openproject
# ref: ${{ inputs.branch }}

- name: Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
path: integration_openproject
# - name: Checkout
# if: github.event_name == 'pull_request'
# uses: actions/checkout@v3
# with:
# path: integration_openproject

- name: Checkout activity app
uses: actions/checkout@v3
with:
repository: nextcloud/activity
path: activity
ref: ${{ matrix.nextcloudVersion }}
# - name: Checkout activity app
# uses: actions/checkout@v3
# with:
# repository: nextcloud/activity
# path: activity
# ref: ${{ matrix.nextcloudVersion }}

- name: Checkout groupfolders app
uses: actions/checkout@v3
with:
repository: nextcloud/groupfolders
path: groupfolders
ref: ${{ matrix.nextcloudVersion }}
# - name: Checkout groupfolders app
# uses: actions/checkout@v3
# with:
# repository: nextcloud/groupfolders
# path: groupfolders
# ref: ${{ matrix.nextcloudVersion }}

- name: Setup PHP ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
tools: composer
extensions: intl
# - name: Setup PHP ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
# tools: composer
# extensions: intl

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
# - name: Get composer cache directory
# id: composer-cache
# run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache PHP dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/integration_openproject/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
# - name: Cache PHP dependencies
# uses: actions/cache@v3
# with:
# path: ${{ steps.composer-cache.outputs.dir }}
# key: ${{ runner.os }}-composer-${{ hashFiles('**/integration_openproject/composer.lock') }}
# restore-keys: ${{ runner.os }}-composer-

- name: API Tests
env:
NEXTCLOUD_BASE_URL: http://nextcloud
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
until curl -s -f http://nextcloud/status.php | grep '"installed":true'; do echo .; sleep 10; done
make api-test
# - name: API Tests
# env:
# NEXTCLOUD_BASE_URL: http://nextcloud
# run: |
# composer install --no-progress --prefer-dist --optimize-autoloader
# until curl -s -f http://nextcloud/status.php | grep '"installed":true'; do echo .; sleep 10; done
# make api-test
Loading

0 comments on commit 9b3f265

Please sign in to comment.