facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.25k stars 626 forks source link

Convert the CircleCI workflow to a GitHub Actions workflow #1221

Open jk0 opened 9 months ago

jk0 commented 9 months ago

Summary

This pull request converts the CircleCI workflows to GitHub actions workflows. Github Actions Importer was used to convert the workflows initially, then I edited them manually to correct errors in translation.

Issues

  1. facebook/metro/build-and-deploy -> test-with-coverage
FAIL scripts/__tests__/babel-lib-defs-test.js
Full Error
Summary of all failing tests
FAIL scripts/__tests__/babel-lib-defs-test.js
  ● Babel Flow library definitions should be up to date

    expect(received).toEqual(expected) // deep equality

    - Expected  - 9
    + Received  + 0

    @@ -898,13 +898,11 @@
          isImmutable(opts?: Opts): boolean;
          isImport(opts?: Opts): boolean;
          isImportAttribute(opts?: Opts): boolean;
          isImportDeclaration(opts?: Opts): boolean;
          isImportDefaultSpecifier(opts?: Opts): boolean;
    -     isImportExpression(opts?: Opts): boolean;
          isImportNamespaceSpecifier(opts?: Opts): boolean;
    -     isImportOrExportDeclaration(opts?: Opts): boolean;
          isImportSpecifier(opts?: Opts): boolean;
          isIndexedAccessType(opts?: Opts): boolean;
          isInferredPredicate(opts?: Opts): boolean;
          isInterfaceDeclaration(opts?: Opts): boolean;
          isInterfaceExtends(opts?: Opts): boolean;
    @@ -1215,13 +1213,11 @@
          assertImmutable(opts?: Opts): void;
          assertImport(opts?: Opts): void;
          assertImportAttribute(opts?: Opts): void;
          assertImportDeclaration(opts?: Opts): void;
          assertImportDefaultSpecifier(opts?: Opts): void;
    -     assertImportExpression(opts?: Opts): void;
          assertImportNamespaceSpecifier(opts?: Opts): void;
    -     assertImportOrExportDeclaration(opts?: Opts): void;
          assertImportSpecifier(opts?: Opts): void;
          assertIndexedAccessType(opts?: Opts): void;
          assertInferredPredicate(opts?: Opts): void;
          assertInterfaceDeclaration(opts?: Opts): void;
          assertInterfaceExtends(opts?: Opts): void;
    @@ -1573,17 +1569,12 @@
          Immutable?: VisitNode,
          Import?: VisitNode,
          ImportAttribute?: VisitNode,
          ImportDeclaration?: VisitNode,
          ImportDefaultSpecifier?: VisitNode,
    -     ImportExpression?: VisitNode,
          ImportNamespaceSpecifier?: VisitNode<
            BabelNodeImportNamespaceSpecifier,
    -       TState,
    -     >,
    -     ImportOrExportDeclaration?: VisitNode<
    -       BabelNodeImportOrExportDeclaration,
            TState,
          >,
          ImportSpecifier?: VisitNode,
          IndexedAccessType?: VisitNode,
          InferredPredicate?: VisitNode,

      20 |   expect(contentByFilePath.size).toBe(2);
      21 |   for (const [filePath, content] of contentByFilePath) {
    > 22 |     expect(await fsPromises.readFile(filePath, 'utf8')).toEqual(content);
         |                                                         ^
      23 |   }
      24 | });
      25 |

      at Object.toEqual (scripts/__tests__/babel-lib-defs-test.js:22:57)

How did you test this change?

I tested these changes in a forked repo.

https://fburl.com/workplace/f6mz6tmw

bigfootjon commented 7 months ago

@robhogan can you just update this PR directly to do what you're asking? Then merge it?