From 8e467ffdfd6bbccc66d7ddf1b77cf31c01fa3825 Mon Sep 17 00:00:00 2001 From: vince-fugnitto Date: Mon, 2 Aug 2021 12:43:07 -0400 Subject: [PATCH] ci: add `github actions` workflow The commit includes a `github actions` workflow for the project (in addition to the already existing jenkins build). The workflow will hopefully help contributors identify issues in prs and cron job sooner. Signed-off-by: vince-fugnitto --- .github/workflows/build.yml | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..81f92c906 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,57 @@ +name: Build + +on: + push: + branches: + - master + workflow_dispatch: + pull_request: + branches: + - master + schedule: + - cron: '0 4 * * *' # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule + +jobs: + + build: + name: ${{ matrix.os }}, Node.js v${{ matrix.node }} + + strategy: + fail-fast: false + matrix: + os: [windows-2019, ubuntu-18.04, macos-10.15] + node: ['12.x'] + + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 # To fetch all history for all branches and tags. (Will be required for caching with lerna: https://github.com/markuplint/markuplint/pull/111) + + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + registry-url: 'https://registry.npmjs.org' + + - name: Use Python 3.x + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Build + shell: bash + run: | + yarn --skip-integrity-check --network-timeout 100000 + env: + NODE_OPTIONS: --max_old_space_size=4096 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 + + - name: Lint + if: matrix.tests != 'skip' + shell: bash + run: | + yarn lint