From ec4dfb40e7c09bb058589dbc77a9da9f5d1109c0 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 7 Jan 2021 01:52:17 -0600 Subject: [PATCH] Add GitHubActions --- .github/workflows/CI.yml | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..bb3a2e9 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,55 @@ +name: CI +on: + pull_request: + push: + branches: + - master + +jobs: + Build: + if: "!contains(github.event.head_commit.message, '[skip ci]')" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + node_version: + - 12 + - 14 + - 15 + node_arch: + - x64 + steps: + # Prepare + - uses: actions/checkout@v2 + - name: Cache node_modules + uses: actions/cache@v2 + env: + cache-name: node_modules + with: + path: node_modules + key: ${{ runner.os }}-${{ matrix.node_version }}-${{ matrix.node_arch }}-${{ hashFiles('package.json') }} + - name: Install Node + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node_version }} + architecture: ${{ matrix.node_arch }} + + # Install and Test + - name: Install dependencies + run: | + npm install + npm install assemblyscript + + - name: Run the tests + run: npm run test + + Skip: + if: contains(github.event.head_commit.message, '[skip ci]') + runs-on: ubuntu-latest + steps: + - name: Skip CI 🚫 + run: echo skip ci