From 7e18c4c04b8ec917dd0fa2fc28a70d5488f1e85f Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Tue, 20 Feb 2024 15:07:15 +0000 Subject: [PATCH] convert circleci lint job to github actions Start the migration from CircleCI to GitHub Actions with migrating the lint job. Used the structure from @robandpdx to setup Nix and use a GitHub key. Restructured the check from `nix flake check` to `nix fmt; git diff --exit-code` so we get a full patch again. Test plan: - Submitted this PR with a formatting error. CI failed. Submitted without and it passed. Co-authored-by: Rob Anderson --- .circleci/config.yml | 14 -------------- .github/workflows/object-introspection.yml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/object-introspection.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 443439f..69a0807 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,8 +3,6 @@ version: 2.1 workflows: object-introspection: jobs: - - lint - - build: name: build-gcc cc: /usr/bin/gcc @@ -33,10 +31,6 @@ workflows: exclude_regex: ".*inheritance_polymorphic.*|.*arrays_member_int0|.*fbstring.*|.*std_string_*|.*multi_arg_tb_.*|.*ignored_member|OilIntegration.fbstring_.*|OilIntegration.capture_keys_string|OilIntegration.capture_keys_multi_level" executors: - nix-docker: - docker: - - image: nixos/nix:latest - resource_class: small ubuntu-docker: docker: - image: ubuntu:jammy @@ -47,14 +41,6 @@ executors: resource_class: 2xlarge jobs: - lint: - executor: nix-docker - steps: - - checkout - - run: - name: Flake check - command: nix --experimental-features 'nix-command flakes' flake check - build: # TODO this job could be run in Docker executor: big-boy diff --git a/.github/workflows/object-introspection.yml b/.github/workflows/object-introspection.yml new file mode 100644 index 0000000..70b41aa --- /dev/null +++ b/.github/workflows/object-introspection.yml @@ -0,0 +1,15 @@ +name: facebookexperimental/object-introspection +on: + pull_request: +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.0 + - uses: cachix/install-nix-action@v25 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - name: nix fmt + run: |- + nix --experimental-features 'nix-command flakes' fmt + git diff --exit-code