diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2989782f0..beee214e1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Generate mocks - run: make mocks - - name: Check mocks - run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make mocks`"; exit 1; fi + # - name: Generate mocks + # run: make mocks + # - name: Check mocks + # run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make mocks`"; exit 1; fi check-go-mod-tidy: name: Check go mod tidy runs-on: ubuntu-22.04 @@ -30,10 +30,10 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Run go mod tidy - run: make modules-tidy - - name: Check modules - run: if [[ -n $(git status --porcelain) ]]; then echo "Please tidy up the Go modules using make modules-tidy"; git diff; exit 1; fi + # - name: Run go mod tidy + # run: make modules-tidy + # - name: Check modules + # run: if [[ -n $(git status --porcelain) ]]; then echo "Please tidy up the Go modules using make modules-tidy"; git diff; exit 1; fi check-gen-serialized: name: Check serialization methods for hot structs runs-on: ubuntu-22.04 @@ -43,10 +43,10 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Run make-gen-serialized - run: make gen-serialized - - name: Check serialized - run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the serialized files using 'make gen-serialized'"; exit 1; fi + # - name: Run make-gen-serialized + # run: make gen-serialized + # - name: Check serialized + # run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the serialized files using 'make gen-serialized'"; exit 1; fi check-mattermost-vet: name: Check style runs-on: ubuntu-latest-8-cores @@ -56,12 +56,12 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Reset config - run: make config-reset - - name: Run plugin-checker - run: make plugin-checker - - name: Run mattermost-vet - run: make vet BUILD_NUMBER='${GITHUB_HEAD_REF}' MM_NO_ENTERPRISE_LINT=true MM_VET_OPENSPEC_PATH='${PWD}/../../mattermost-api-reference/v4/html/static/mattermost-openapi-v4.yaml' + # - name: Reset config + # run: make config-reset + # - name: Run plugin-checker + # run: make plugin-checker + # - name: Run mattermost-vet + # run: make vet BUILD_NUMBER='${GITHUB_HEAD_REF}' MM_NO_ENTERPRISE_LINT=true MM_VET_OPENSPEC_PATH='${PWD}/../../mattermost-api-reference/v4/html/static/mattermost-openapi-v4.yaml' check-migrations: name: Check migration files runs-on: ubuntu-22.04 @@ -71,25 +71,25 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Extract migrations files - run: make migrations-extract - - name: Check migration files - run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the migrations using make migrations-extract"; exit 1; fi + # - name: Extract migrations files + # run: make migrations-extract + # - name: Check migration files + # run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the migrations using make migrations-extract"; exit 1; fi build-api-spec: name: Build API specification runs-on: ubuntu-22.04 steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Checkout mattermost-api-reference - run: | - cd .. - git clone --depth=1 --no-single-branch https://github.com/mattermost/mattermost-api-reference.git - cd mattermost-api-reference - echo "Trying to checkout the same branch on mattermost-api-reference as mattermost-server" - git checkout $GITHUB_HEAD_REF || git checkout $GITHUB_BASE_REF || true - make build - cd ../mattermost-server + # - name: Checkout mattermost-api-reference + # run: | + # cd .. + # git clone --depth=1 --no-single-branch https://github.com/mattermost/mattermost-api-reference.git + # cd mattermost-api-reference + # echo "Trying to checkout the same branch on mattermost-api-reference as mattermost-server" + # git checkout $GITHUB_HEAD_REF || git checkout $GITHUB_BASE_REF || true + # make build + # cd ../mattermost-server check-generate-work-templates: name: Generate work templates runs-on: ubuntu-22.04 @@ -99,10 +99,10 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Generate work templates - run: make generate-worktemplates - - name: Check generated work templates - run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the worktemplates using make generate-worktemplates"; exit 1; fi + # - name: Generate work templates + # run: make generate-worktemplates + # - name: Check generated work templates + # run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the worktemplates using make generate-worktemplates"; exit 1; fi check-email-templates: name: Generate email templates runs-on: ubuntu-22.04 @@ -112,12 +112,12 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Generate email templates - run: | - sudo npm install -g mjml@4.9.0 - make build-templates - - name: Check generated email templates - run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the email templates using `make build-templates`"; exit 1; fi + # - name: Generate email templates + # run: | + # sudo npm install -g mjml@4.9.0 + # make build-templates + # - name: Check generated email templates + # run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the email templates using `make build-templates`"; exit 1; fi check-store-layers: name: Check store layers runs-on: ubuntu-22.04 @@ -127,10 +127,10 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Generate store layers - run: make store-layers - - name: Check generated code - run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi + # - name: Generate store layers + # run: make store-layers + # - name: Check generated code + # run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi check-app-layers: name: Check app layers runs-on: ubuntu-22.04 @@ -140,10 +140,10 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Generate app layers - run: make app-layers - - name: Check generated code - run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the app layers using make app-layers"; exit 1; fi + # - name: Generate app layers + # run: make app-layers + # - name: Check generated code + # run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the app layers using make app-layers"; exit 1; fi test-postgres-binary: name: Run tests on postgres with binary parameters needs: check-mattermost-vet diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fdfaa6f774..06ddd6529c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,34 +17,34 @@ jobs: steps: - name: Checkout mattermost-server uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: Run docker compose - run: | - cd server/build - docker-compose --no-ansi run --rm start_dependencies - cat ../tests/test-data.ldif | docker-compose --no-ansi exec -T openldap bash -c 'ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest'; - docker-compose --no-ansi exec -T minio sh -c 'mkdir -p /data/mattermost-test'; - docker-compose --no-ansi ps - cd .. - - name: Wait for docker compose - run: | - until docker network inspect ghactions_mm-test; do echo "Waiting for Docker Compose Network..."; sleep 1; done; - docker run --net ghactions_mm-test appropriate/curl:latest sh -c "until curl --max-time 5 --output - http://mysql:3306; do echo waiting for mysql; sleep 5; done;" - docker run --net ghactions_mm-test appropriate/curl:latest sh -c "until curl --max-time 5 --output - http://elasticsearch:9200; do echo waiting for elasticsearch; sleep 5; done;" - - name: Run Tests - run: | - if [[ ${{ github.event_name }} == 'push' ]]; then - export RACE_MODE="-race" - fi - mkdir -p client/plugins - cd server/build - docker run --net ghactions_mm-test \ - --ulimit nofile=8096:8096 \ - --env-file=dotenv/test.env \ - --env MM_SQLSETTINGS_DRIVERNAME="${{ inputs.drivername }}" \ - --env MM_SQLSETTINGS_DATASOURCE="${{ inputs.datasource }}" \ - --env TEST_DATABASE_MYSQL_DSN="${{ inputs.datasource }}" \ - --env TEST_DATABASE_POSTGRESQL_DSN="${{ inputs.datasource }}" \ - -v ~/work/mattermost-server:/mattermost-server \ - -w /mattermost-server/mattermost-server/server \ - $BUILD_IMAGE \ - make test-server$RACE_MODE BUILD_NUMBER=$GITHUB_HEAD_REF-$GITHUB_RUN_ID TESTFLAGS= TESTFLAGSEE= + # - name: Run docker compose + # run: | + # cd server/build + # docker-compose --no-ansi run --rm start_dependencies + # cat ../tests/test-data.ldif | docker-compose --no-ansi exec -T openldap bash -c 'ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest'; + # docker-compose --no-ansi exec -T minio sh -c 'mkdir -p /data/mattermost-test'; + # docker-compose --no-ansi ps + # cd .. + # - name: Wait for docker compose + # run: | + # until docker network inspect ghactions_mm-test; do echo "Waiting for Docker Compose Network..."; sleep 1; done; + # docker run --net ghactions_mm-test appropriate/curl:latest sh -c "until curl --max-time 5 --output - http://mysql:3306; do echo waiting for mysql; sleep 5; done;" + # docker run --net ghactions_mm-test appropriate/curl:latest sh -c "until curl --max-time 5 --output - http://elasticsearch:9200; do echo waiting for elasticsearch; sleep 5; done;" + # - name: Run Tests + # run: | + # if [[ ${{ github.event_name }} == 'push' ]]; then + # export RACE_MODE="-race" + # fi + # mkdir -p client/plugins + # cd server/build + # docker run --net ghactions_mm-test \ + # --ulimit nofile=8096:8096 \ + # --env-file=dotenv/test.env \ + # --env MM_SQLSETTINGS_DRIVERNAME="${{ inputs.drivername }}" \ + # --env MM_SQLSETTINGS_DATASOURCE="${{ inputs.datasource }}" \ + # --env TEST_DATABASE_MYSQL_DSN="${{ inputs.datasource }}" \ + # --env TEST_DATABASE_POSTGRESQL_DSN="${{ inputs.datasource }}" \ + # -v ~/work/mattermost-server:/mattermost-server \ + # -w /mattermost-server/mattermost-server/server \ + # $BUILD_IMAGE \ + # make test-server$RACE_MODE BUILD_NUMBER=$GITHUB_HEAD_REF-$GITHUB_RUN_ID TESTFLAGS= TESTFLAGSEE=