Skip to content

Automated cherry pick of #243 #632

Automated cherry pick of #243

Automated cherry pick of #243 #632

Workflow file for this run

name: Check-in tests
on:
push:
branches:
- 'main'
- 'releases-**'
pull_request:
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
EXCLUDE_ENTERPRISE: true
permissions:
contents: read
id-token: write
jobs:
webapp-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: "focalboard"
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: focalboard/.nvmrc
- name: npm ci
run: cd focalboard/webapp && npm ci
- name: Lint & test webapp
run: cd focalboard; make webapp-ci
server-test:
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: mmuser
POSTGRES_PASSWORD: mostest
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
TEST_DATABASE_DRIVERNAME: postgres
FOCALBOARD_STORE_TEST_DB_TYPE: postgres
FOCALBOARD_STORE_TEST_DOCKER_PORT: "5432"
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: "focalboard"
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: focalboard/go.mod
- name: set up golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8
- name: Lint & test server
run: cd focalboard; make server-ci
dist:
permissions:
contents: read
id-token: write
uses: mattermost/actions-workflows/.github/workflows/plugin-dist-pr.yml@main
secrets: inherit
with:
dist-target: "dist-linux"
s3-prefix: "mattermost-plugin-boards"
dist-fips:
# Skip FIPS testing for forks, which won't have the chainguard identity.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-22.04
needs:
- server-test
- webapp-test
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: go.mod
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: .nvmrc
- name: npm ci
run: cd webapp && npm ci
- name: Get short SHA
id: short-sha
run: echo "sha=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
- name: Build FIPS
uses: mattermost/actions/plugin-ci/build-fips@c7a06bc642f72fc227deb2cae3af03cff72c0f0d
with:
chainguard-identity: ${{ secrets.CHAINGUARD_IDENTITY }}
- name: Upload FIPS build artifact
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: boards-bundle-fips-${{ steps.short-sha.outputs.sha }}
path: dist-fips/boards-*.tar.gz
retention-days: 7
e2e:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: "focalboard"
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: focalboard/go.mod
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: focalboard/.nvmrc
- name: Install webapp dependencies
run: cd focalboard/webapp && npm ci
- name: Build plugin
run: cd focalboard && make dist-linux
- name: Run e2e tests
run: cd focalboard && make e2e-ci
env:
CI: true
- name: Upload test report
if: always()
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: e2e-playwright-report
path: focalboard/e2e/playwright-report/
retention-days: 7