From b0efcf1e37dc82c4df2bb0966fdd7ddd1bebaf2f Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Tue, 19 Mar 2024 19:01:27 -0700 Subject: [PATCH] [ci] Properly test mac and linux in GitHub Actions CI (#9130) Summary: Currently, the mac and linux tests are passing, but if we look at the logs, they are failing for every single test. It turns out that we are not even downloading the artifacts from previous build jobs. We also need to set the executable bit to actually make the tests runnable (this is not needed in circle ci jobs and also not needed for windows builds, so it's unclear why, which needs further investigation) Pull Request resolved: https://github.com/facebook/flow/pull/9130 Test Plan: See the CI on GitHub Reviewed By: gkz Differential Revision: D55020261 Pulled By: SamChou19815 fbshipit-source-id: 877195f40c22a0f408aebb72eb9f60f59ec28733 --- .github/workflows/build_and_test.yml | 54 +++++++++++++++++++--------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 51c65601551..f76b796c912 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -303,6 +303,11 @@ jobs: FLOW_RUNTESTS_PARALLELISM: 8 steps: - uses: actions/checkout@v3.6.0 + - uses: actions/download-artifact@v3.0.2 + with: + name: build_linux_bin + path: bin/linux + - run: chmod +x bin/linux/flow - name: Run tests run: ./runtests.sh bin/linux/flow | cat runtests_macos: @@ -314,6 +319,11 @@ jobs: with: xcode-version: '13.4' - uses: actions/checkout@v3.6.0 + - uses: actions/download-artifact@v3.0.2 + with: + name: build_macos_bin + path: bin/macos + - run: chmod +x bin/macos/flow - name: Run tests run: ./runtests.sh bin/macos/flow | cat tool_test_linux: @@ -324,6 +334,11 @@ jobs: - build_linux steps: - uses: actions/checkout@v3.6.0 + - uses: actions/download-artifact@v3.0.2 + with: + name: build_linux_bin + path: bin/linux + - run: chmod +x bin/linux/flow - name: Install tool deps from yarn run: (cd packages/flow-dev-tools && yarn install | cat) - name: Run tool tests @@ -337,27 +352,32 @@ jobs: with: xcode-version: '13.4' - uses: actions/checkout@v3.6.0 + - uses: actions/download-artifact@v3.0.2 + with: + name: build_macos_bin + path: bin/macos + - run: chmod +x bin/macos/flow - name: Install tool deps from yarn run: (cd packages/flow-dev-tools && yarn install | cat) - name: Run tool tests run: ./tool test --bin bin/macos/flow | cat # tool_test_win: - # runs-on: windows-latest - # needs: - # - build_win - # steps: - # - uses: actions/checkout@v3.6.0 - # - name: Install Node LTS - # run: choco install nodejs-lts -y - # - name: Enable Corepack - # run: corepack enable - # - name: Install tool deps from yarn - # run: |- - # cd packages/flow-dev-tools - # yarn install --ignore-scripts --pure-lockfile - # - name: Run tool tests - # run: node packages/flow-dev-tools/bin/tool test --bin bin/win64/flow.exe --parallelism 1 - # shell: bash + # runs-on: windows-latest + # needs: + # - build_win + # steps: + # - uses: actions/checkout@v3.6.0 + # - uses: actions/download-artifact@v3.0.2 + # with: + # name: build_win_bin + # path: bin/win64 + # - name: Install tool deps from yarn + # run: |- + # cd packages/flow-dev-tools + # yarn install --ignore-scripts --pure-lockfile + # - name: Run tool tests + # run: node packages/flow-dev-tools/bin/tool test --bin bin/win64/flow.exe --parallelism 1 + # shell: bash ounit_test_linux: runs-on: ubuntu-latest container: @@ -662,4 +682,4 @@ jobs: # run: | # echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc # npm publish ./dist/npm-try-flow-website-js.tgz - \ No newline at end of file +