Skip to content

Commit

Permalink
Modify go.work file to include multi-product architecture repositorie…
Browse files Browse the repository at this point in the history
…s by default (mattermost-community#3516)

* Fix pipelines and makefile to build multi-product architecture repositories

Signed-off-by: Mustafa Kara <mustafa.kara@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: wiggin77 <wiggin77@warpmail.net>
  • Loading branch information
3 people authored Aug 3, 2022
1 parent 158f28e commit e7b5830
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ mattermost-plugin/
website/
linux/
go.work
go.work.sum
go.work.sum
93 changes: 81 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
pull_request:
workflow_dispatch:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
EXCLUDE_ENTERPRISE: true

jobs:

ci-ubuntu-server:
Expand All @@ -23,26 +27,57 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

with:
path: "focalboard"
- id: "mattermostServer"
uses: actions/checkout@v3
continue-on-error: true
with:
repository: "mattermost/mattermost-server"
fetch-depth: "20"
path: "mattermost-server"
ref: ${{ env.BRANCH_NAME }}
- uses: actions/checkout@v3
if: steps.mattermostServer.outcome == 'failure'
with:
repository: "mattermost/mattermost-server"
fetch-depth: "20"
path: "mattermost-server"
ref : "master"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.1

- name: "Test server: ${{matrix['db']}}"
run: make server-test-${{matrix['db']}}
run: cd focalboard; make server-test-${{matrix['db']}}

ci-ubuntu-webapp:
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v3

with:
path: "focalboard"
- id: "mattermostServer"
uses: actions/checkout@v3
continue-on-error: true
with:
repository: "mattermost/mattermost-server"
fetch-depth: "20"
path: "mattermost-server"
ref: ${{ env.BRANCH_NAME }}
- uses: actions/checkout@v3
if: steps.mattermostServer.outcome == 'failure'
with:
repository: "mattermost/mattermost-server"
fetch-depth: "20"
path: "mattermost-server"
ref : "master"
- name: npm ci
run: |
cd webapp && npm ci && cd -
cd mattermost-plugin/webapp && npm ci
cd focalboard/webapp && npm ci && cd -
cd focalboard/mattermost-plugin/webapp && npm ci
- name: Set up Go
uses: actions/setup-go@v3
Expand All @@ -55,19 +90,19 @@ jobs:
node-version: 16.1.0

- name: Build Linux server
run: make server-linux-package
run: cd focalboard; make server-linux-package

- name: Copy server binary for Cypress
run: cp bin/linux/focalboard-server bin/
run: cp focalboard/bin/linux/focalboard-server focalboard/bin/

- name: Upload server package
uses: actions/upload-artifact@v1
with:
name: focalboard-server-linux-amd64.tar.gz
path: ${{ github.workspace }}/dist/focalboard-server-linux-amd64.tar.gz
path: ${{ github.workspace }}/focalboard/dist/focalboard-server-linux-amd64.tar.gz

- name: Lint & test webapp
run: make webapp-ci
run: cd focalboard; make webapp-ci

ci-windows-server:
runs-on: windows-2022
Expand All @@ -80,14 +115,31 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: "focalboard"
- id: "mattermostServer"
uses: actions/checkout@v3
continue-on-error: true
with:
repository: "mattermost/mattermost-server"
fetch-depth: "20"
path: "mattermost-server"
ref: ${{ env.BRANCH_NAME }}
- uses: actions/checkout@v3
if: steps.mattermostServer.outcome == 'failure'
with:
repository: "mattermost/mattermost-server"
fetch-depth: "20"
path: "mattermost-server"
ref : "master"

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.1

- name: "Test server (minimum): ${{matrix['db']}}"
run: make server-test-mini-${{matrix['db']}}
run: cd focalboard; make server-test-mini-${{matrix['db']}}

ci-mac-server:
runs-on: macos-11
Expand All @@ -100,11 +152,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: "focalboard"
- id: "mattermostServer"
uses: actions/checkout@v3
continue-on-error: true
with:
repository: "mattermost/mattermost-server"
fetch-depth: "20"
path: "mattermost-server"
ref: ${{ env.BRANCH_NAME }}
- uses: actions/checkout@v3
if: steps.mattermostServer.outcome == 'failure'
with:
repository: "mattermost/mattermost-server"
fetch-depth: "20"
path: "mattermost-server"
ref : "master"

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.1

- name: "Test server (minimum): ${{matrix['db']}}"
run: make server-test-mini-${{matrix['db']}}
run: cd focalboard; make server-test-mini-${{matrix['db']}}
Loading

0 comments on commit e7b5830

Please sign in to comment.