From 7023b2aae6d978a881389e5b8a8ebbc08c8c986e Mon Sep 17 00:00:00 2001 From: Matt Provost Date: Thu, 5 Jan 2023 14:04:38 -0800 Subject: [PATCH] Add test and lint workflow (#165) * Add build and test workflow Signed-off-by: Matt Provost * Fix Signed-off-by: Matt Provost * Add Windows build Signed-off-by: Matt Provost * Add yarn cache Signed-off-by: Matt Provost Signed-off-by: Matt Provost (cherry picked from commit 81b57bf411da251b9a808bf74aa87f0ad5ff6dbc) --- .github/workflows/build_and_test.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/build_and_test.yml diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000000..6602fb9c1e --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,41 @@ +name: Build and test + +on: + push: + branches: ['**', '!backport/**'] + paths-ignore: + - '**/*.md' + pull_request: + branches: ['**'] + paths-ignore: + - '**/*.md' + +jobs: + build-lint-test: + runs-on: ${{ matrix.os }} + name: Build and Verify + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + registry-url: 'https://registry.npmjs.org' + cache: 'yarn' + + - name: Setup Yarn + run: | + npm uninstall -g yarn + npm i -g yarn@1.22.10 + yarn install --frozen-lockfile + + - name: Run linter + run: yarn lint + + - name: Run unit tests + run: yarn test-unit