From 0eece3574658d07d68bca175be13ade7c141d206 Mon Sep 17 00:00:00 2001 From: Joseph Flinn Date: Wed, 12 May 2021 16:52:27 -0700 Subject: [PATCH] switching the build back to windows because of the karma testing. Moving the locales-testing to a previous job --- .github/workflows/build.yml | 38 +++++++++++--------- .github/workflows/release.yml | 68 +++++++++++++++++++---------------- 2 files changed, 60 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd9e9aaf67..f5feacf72d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,27 +41,13 @@ jobs: echo "::set-output name=repo_url::$repo_url" echo "::set-output name=adj_build_number::$adj_build_num" - - browser: - runs-on: ubuntu-latest + locales-test: + runs-on: ubunut-latest needs: setup - env: - REPO_URL: ${{ needs.setup.outputs.repo_url }} - BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }} steps: - name: Checkout repo uses: actions/checkout@v2 - - name: Set up Node - uses: actions/setup-node@v1 - with: - node-version: '14.x' - - - name: Print environment - run: | - node --version - npm --version - - name: Testing locale lengths run: | errors=0 @@ -83,6 +69,26 @@ jobs: echo "Test passed" fi + build: + runs-on: windows-latest + needs: [ setup, locales-test ] + env: + REPO_URL: ${{ needs.setup.outputs.repo_url }} + BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }} + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Set up Node + uses: actions/setup-node@v1 + with: + node-version: '14.x' + + - name: Print environment + run: | + node --version + npm --version + - name: npm setup & test run: | npm install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f90d96b99d..8fd67b3024 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,9 +64,38 @@ jobs: prerelease: false - browser: - runs-on: windows-latest + locales-test: + runs-on: ubunut-latest needs: setup + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Testing locale lengths + run: | + errors=0 + echo "Testing locales extName lengths" + echo "All must be 40 or less for Safari" + echo "=================================" + for file in $(ls src/_locales/); + do + test_string=$(cat src/_locales/$file/messages.json | jq .extName.message | tr -d '"') + if [[ ${#test_string} -gt 40 ]]; then + echo $file: ${#test_string} + errors=1 + fi + done + + if [[ $errors -eq 1 ]]; then + exit 1 + else + echo "Test passed" + fi + + + build: + runs-on: windows-latest + needs: [ setup, locales-test ] env: REPO_URL: ${{ needs.setup.outputs.repo_url }} BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }} @@ -90,41 +119,20 @@ jobs: npm run dist npm run test - - name: Testing locale lengths - run: | - errors=0 - echo "Testing locales extName lengths" - echo "All must be 40 or less for Safari" - echo "=================================" - for file in $(ls src/_locales/); - do - test_string=$(cat src/_locales/$file/messages.json | jq .extName.message | tr -d '"') - if [[ ${#test_string} -gt 40 ]]; then - echo $file: ${#test_string} - errors=1 - fi - done - - if [[ $errors -eq 1 ]]; then - exit 1 - else - echo "Test passed" - fi - - name: gulp run: gulp ci - name: Build sources for reviewers shell: cmd run: | - mkdir dist\Source - call git clone %REPO_URL% dist\Source - cd dist\Source - call git checkout %GITHUB_SHA% - call git submodule update --init --recursive + mkdir dist/Source + git clone $REPO_URL dist/Source + cd dist/Source + git checkout $GITHUB_SHA + git submodule update --init --recursive cd ../ - del /S/Q "Source\.git\objects\pack\*" - call 7z a browser-source-%BUILD_NUMBER%.zip "Source\*" + rm -rf Source/.git/objects/pack/* + zip -r browser-source-$BUILD_NUMBER.zip Source/* - name: upload opera release asset uses: actions/upload-release-asset@v1