Skip to content

Commit

Permalink
ci: add github actions workflow
Browse files Browse the repository at this point in the history
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 <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto committed Aug 3, 2021
1 parent 4c88980 commit 4d8f470
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4d8f470

Please sign in to comment.