diff --git a/.github/workflows/challenge1.yml b/.github/workflows/challenge1.yml new file mode 100644 index 00000000..a1aef967 --- /dev/null +++ b/.github/workflows/challenge1.yml @@ -0,0 +1,61 @@ +name: Node.js CI + + + +on: [pull_request] + + +jobs: + build: + + + + runs-on: ubuntu-latest + + + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - uses: actions/upload-artifact@main + with: + name: artifacts + path: | + lib/ + test/ + views/ + package.json + index.js + test: + runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest] + node-version: [14.x] + needs: build + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@main + with: + name: artifacts + path: artifacts + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, and test + run: | + npm install + npm test