From 0c9141efe1fa98b96ddff25a85ca08b47823a20b Mon Sep 17 00:00:00 2001 From: Govind Goel <52847415+govindgoel@users.noreply.github.com> Date: Sat, 12 Jun 2021 01:04:26 +0530 Subject: [PATCH] workflows: add tests.yml This commit is to move tests from Travis CI to Github Actions --- .github/workflows/tests.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..65bda31 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,28 @@ +name: tests +on: [pull_request] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [8.x] + steps: + - uses: actions/checkout@v2 + - name: Setup with Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Cache Node.js modules + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node- + ${{ runner.OS }}- + - name: Install dependencies + run: npm install grunt-cli + - name: "Build dist files" + run: grunt build + - name: "Run tests" + run: npm test