diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index 40c335dcca9c..da9807df32c0 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -62,17 +62,17 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '11' distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -88,7 +88,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -133,10 +133,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -151,7 +151,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.YARN_CACHE_LOCATION }} key: yarn-${{ hashFiles('**/yarn.lock') }} @@ -161,6 +161,25 @@ jobs: - name: Run bootstrap run: yarn osd bootstrap + - name: Check for yarn.lock changes + run: | + if [[ `git status --porcelain yarn.lock` ]]; then + echo -e "\033[31mThe yarn.lock file is out of sync!\033[0m" + git diff + exit 1 + fi + + - name: Generate dev docs + run: yarn docs:generateDevDocs + + - name: Check for dev docs changes + run: | + if [[ `git status --porcelain docs/_sidebar.md` ]]; then + echo -e "\033[31mThe dev docs are out of sync; run yarn docs:generateDevDocs and amend the PR.\033[0m" + git diff + exit 1 + fi + - name: Run linter id: linter run: yarn lint @@ -169,6 +188,10 @@ jobs: id: notice-validate run: yarn notice:validate + - name: Validate licenses + id: i18n-check + run: yarn checkLicenses + - name: Check i18n id: i18n-check run: yarn i18n:check @@ -203,17 +226,17 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '11' distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -229,7 +252,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -319,17 +342,17 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '11' distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -345,7 +368,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -451,12 +474,12 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ./artifacts - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -472,7 +495,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -540,7 +563,7 @@ jobs: ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ./artifacts @@ -548,7 +571,7 @@ jobs: - run: echo [NOTE] These tests will be ran using Linux x64 release builds without security - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -583,7 +606,7 @@ jobs: run: echo "BWC_VERSIONS=${{ matrix.version }}" >> $GITHUB_ENV - name: Download OpenSearch Dashboards - uses: actions/download-artifact@v4.1.7 + uses: actions/download-artifact@v4 id: download with: name: linux-x64-${{ env.VERSION }}