mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05:00
Some checks failed
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
BuildEnv Docker Image / build-image (push) Has been cancelled
BuildEnv Docker Image / build-image-fips (push) Has been cancelled
* fixes registry used for mattermost-build-server image push and pull * fixes credentials needed for logging in to mattermosr registry
114 lines
4.4 KiB
YAML
114 lines
4.4 KiB
YAML
name: mmctl CI
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
name:
|
|
required: true
|
|
type: string
|
|
datasource:
|
|
required: true
|
|
type: string
|
|
drivername:
|
|
required: true
|
|
type: string
|
|
logsartifact:
|
|
required: true
|
|
type: string
|
|
go-version:
|
|
required: true
|
|
type: string
|
|
fips-enabled:
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
test:
|
|
name: ${{ inputs.name }}
|
|
runs-on: ubuntu-22.04
|
|
env:
|
|
COMPOSE_PROJECT_NAME: ghactions
|
|
steps:
|
|
- name: buildenv/docker-login
|
|
# Only FIPS requires login for private build container. (Forks won't have credentials.)
|
|
if: inputs.fips-enabled
|
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Checkout mattermost project
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Setup BUILD_IMAGE
|
|
id: build
|
|
run: |
|
|
if [[ ${{ inputs.fips-enabled }} == 'true' ]]; then
|
|
echo "BUILD_IMAGE=mattermost/mattermost-build-server-fips:${{ inputs.go-version }}" >> "${GITHUB_OUTPUT}"
|
|
echo "LOG_ARTIFACT_NAME=${{ inputs.logsartifact }}-fips" >> "${GITHUB_OUTPUT}"
|
|
else
|
|
echo "BUILD_IMAGE=mattermost/mattermost-build-server:${{ inputs.go-version }}" >> "${GITHUB_OUTPUT}"
|
|
echo "LOG_ARTIFACT_NAME=${{ inputs.logsartifact }}" >> "${GITHUB_OUTPUT}"
|
|
fi
|
|
|
|
- name: Store required variables for publishing results
|
|
run: |
|
|
echo "${{ inputs.name }}" > server/test-name
|
|
echo "${{ github.event.pull_request.number }}" > server/pr-number
|
|
- name: Setup needed prepackaged plugins
|
|
run: |
|
|
cd server
|
|
make prepackaged-plugins PLUGIN_PACKAGES=mattermost-plugin-jira-v3.2.5
|
|
|
|
- name: Run docker compose
|
|
run: |
|
|
cd server/build
|
|
docker compose --ansi never run --rm start_dependencies
|
|
cat ../tests/custom-schema-objectID.ldif | docker compose --ansi never exec -T openldap bash -c 'ldapadd -Y EXTERNAL -H ldapi:/// -w mostest || true';
|
|
cat ../tests/custom-schema-cpa.ldif | docker compose --ansi never exec -T openldap bash -c 'ldapadd -Y EXTERNAL -H ldapi:/// -w mostest || true';
|
|
cat ../tests/test-data.ldif | docker compose --ansi never exec -T openldap bash -c 'ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';
|
|
docker compose --ansi never exec -T minio sh -c 'mkdir -p /data/mattermost-test';
|
|
docker compose --ansi never ps
|
|
|
|
- name: Run mmctl Tests
|
|
env:
|
|
BUILD_IMAGE: ${{ steps.build.outputs.BUILD_IMAGE }}
|
|
run: |
|
|
if [[ ${{ github.ref_name }} == 'master' ]]; then
|
|
export TESTFLAGS="-timeout 90m -race"
|
|
else
|
|
export TESTFLAGS="-timeout 30m"
|
|
fi
|
|
docker run --net ghactions_mm-test \
|
|
--ulimit nofile=8096:8096 \
|
|
--env-file=server/build/dotenv/test.env \
|
|
--env MM_SQLSETTINGS_DATASOURCE="${{ inputs.datasource }}" \
|
|
--env MMCTL_TESTFLAGS="$TESTFLAGS" \
|
|
--env FIPS_ENABLED="${{ inputs.fips-enabled }}" \
|
|
-v $PWD:/mattermost \
|
|
-w /mattermost/server \
|
|
$BUILD_IMAGE \
|
|
make test-mmctl BUILD_NUMBER=$GITHUB_HEAD_REF-$GITHUB_RUN_ID
|
|
|
|
- name: Stop docker compose
|
|
run: |
|
|
cd server/build
|
|
docker compose --ansi never stop
|
|
|
|
- name: Save mmctl test report to Zephyr Scale
|
|
if: ${{ always() && hashFiles('server/report.xml') != '' && github.event_name != 'pull_request' && (github.ref_name == 'master' || startsWith(github.ref_name, 'release-')) }}
|
|
uses: ./.github/actions/save-junit-report-tms
|
|
with:
|
|
report-path: server/report.xml
|
|
zephyr-api-key: ${{ secrets.MM_E2E_ZEPHYR_API_KEY }}
|
|
build-image: ${{ steps.build.outputs.BUILD_IMAGE }}
|
|
|
|
- name: Archive logs
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: ${{ steps.build.outputs.LOG_ARTIFACT_NAME }}
|
|
path: |
|
|
server/gotestsum.json
|
|
server/report.xml
|
|
server/test-name
|
|
server/pr-number
|