From 8c1a672f929635f8a40d5fa8ee64fb9fa8577713 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Mon, 13 Nov 2023 03:57:52 -0800 Subject: [PATCH] GitHub Actions Cleanup (#1467) Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1467 1. Avoid reusing workflow names between validation and publish jobs, since they show up with the same UI when wanting to adhoc trigger a publish. 2. Merge SwiftPM checks into Validate Apple job 3. Merge remnants of website-next workflow into website workflow (and remove a redundant explicit build step already removed in one workflow) 4. Run more validation on push to release branch 5. Do not run website validation off of main, since it is only ever deployed from main branch Reviewed By: cipolleschi Differential Revision: D51236885 fbshipit-source-id: dd8165aa9871f173d8914f345569c6cde1edda72 --- .github/workflows/publish-website.yml | 2 +- .github/workflows/validate-android.yml | 3 +- .github/workflows/validate-apple.yml | 18 ++++++++-- .github/workflows/validate-cpp.yml | 3 +- .github/workflows/validate-js.yml | 3 +- .github/workflows/validate-python.yml | 21 ------------ .github/workflows/validate-swiftpm.yml | 22 ------------ .github/workflows/validate-website-next.yml | 37 --------------------- .github/workflows/validate-website.yml | 22 +++++++++--- 9 files changed, 40 insertions(+), 91 deletions(-) delete mode 100644 .github/workflows/validate-python.yml delete mode 100644 .github/workflows/validate-swiftpm.yml delete mode 100644 .github/workflows/validate-website-next.yml diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml index e0060779..390bc527 100644 --- a/.github/workflows/publish-website.yml +++ b/.github/workflows/publish-website.yml @@ -1,4 +1,4 @@ -name: Website +name: Publish Website on: push: diff --git a/.github/workflows/validate-android.yml b/.github/workflows/validate-android.yml index 3da04e98..dff4fb52 100644 --- a/.github/workflows/validate-android.yml +++ b/.github/workflows/validate-android.yml @@ -1,10 +1,11 @@ -name: Android +name: Validate Android on: pull_request: push: branches: - main + - 'release-*' workflow_dispatch: jobs: diff --git a/.github/workflows/validate-apple.yml b/.github/workflows/validate-apple.yml index 1b2dcd13..598ca2e8 100644 --- a/.github/workflows/validate-apple.yml +++ b/.github/workflows/validate-apple.yml @@ -1,15 +1,16 @@ -name: Apple +name: Validate Apple on: pull_request: push: branches: - main + - 'release-*' workflow_dispatch: jobs: lint-pods: - name: Lint pod + name: Build [CocoaPods] runs-on: macos-latest steps: @@ -20,3 +21,16 @@ jobs: - name: pod lib lint run: pod lib lint --verbose --include-podspecs=**/*.podspec + + test: + name: Build [SwiftPM] + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build Debug + run: swift build -c debug + + - name: Build Release + run: swift build -c release diff --git a/.github/workflows/validate-cpp.yml b/.github/workflows/validate-cpp.yml index cbb8168a..c8a0f0e8 100644 --- a/.github/workflows/validate-cpp.yml +++ b/.github/workflows/validate-cpp.yml @@ -1,10 +1,11 @@ -name: C++ +name: Validate C++ on: pull_request: push: branches: - main + - 'release-*' workflow_dispatch: env: diff --git a/.github/workflows/validate-js.yml b/.github/workflows/validate-js.yml index fa26dbca..489064c7 100644 --- a/.github/workflows/validate-js.yml +++ b/.github/workflows/validate-js.yml @@ -1,10 +1,11 @@ -name: JavaScript +name: Validate JavaScript on: pull_request: push: branches: - main + - 'release-*' workflow_dispatch: env: diff --git a/.github/workflows/validate-python.yml b/.github/workflows/validate-python.yml deleted file mode 100644 index 6ff392d2..00000000 --- a/.github/workflows/validate-python.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Python - -on: - pull_request: - push: - branches: - - main - workflow_dispatch: - -jobs: - format: - name: Format - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: black --check - uses: ./.github/actions/black - with: - directory: ${{ github.workspace }} diff --git a/.github/workflows/validate-swiftpm.yml b/.github/workflows/validate-swiftpm.yml deleted file mode 100644 index da582708..00000000 --- a/.github/workflows/validate-swiftpm.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Swift - -on: - pull_request: - push: - branches: - - main - workflow_dispatch: - -jobs: - test: - name: Build - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - - name: Build Debug - run: swift build -c debug - - - name: Build Release - run: swift build -c release diff --git a/.github/workflows/validate-website-next.yml b/.github/workflows/validate-website-next.yml deleted file mode 100644 index 2a8f61e7..00000000 --- a/.github/workflows/validate-website-next.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Website (Next) - -on: - pull_request: - push: - branches: - - main - workflow_dispatch: - - build: - name: Build - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Setup - uses: ./.github/actions/setup-js - - - name: Build Website - run: yarn build - working-directory: website-next - - typecheck: - name: Typecheck - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: yarn install - run: yarn install --frozen-lockfile - working-directory: javascript - - - name: yarn tsc - run: yarn tsc - working-directory: website-next diff --git a/.github/workflows/validate-website.yml b/.github/workflows/validate-website.yml index 4f79beeb..cdfbd4a5 100644 --- a/.github/workflows/validate-website.yml +++ b/.github/workflows/validate-website.yml @@ -1,7 +1,9 @@ -name: Website +name: Validate Website on: pull_request: + branches: + - main push: branches: - main @@ -32,10 +34,20 @@ jobs: - name: Setup uses: ./.github/actions/setup-js - - name: Build Yoga - run: yarn build - working-directory: javascript - - name: Build Website run: yarn build working-directory: website-next + + typecheck: + name: Typecheck [Docusaurus] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup-js + + - name: yarn tsc + run: yarn tsc + working-directory: website-next