From b2352db2cee0d59001b7ccbe68d5ba617cdcd2c5 Mon Sep 17 00:00:00 2001 From: Oli Date: Fri, 27 Oct 2023 13:49:01 +0200 Subject: [PATCH] ci.yml --- .github/workflows/blank.yml | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..39479c6 --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,56 @@ +name: CI + +on: + pull_request: + branches: + - '*' + push: + branches: + - '*' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 16.x + uses: actions/setup-node@v3.6.0 + with: + node-version: 16.x + - name: Cache Node.js modules + uses: actions/cache@v3.3.1 + with: + path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + key: ${{ runner.OS }}-node-16.x-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node-16.x + ${{ runner.OS }}- + - name: Install dependencies + run: npm ci + - name: Lint the code + run: npm run lint --if-present + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3.6.0 + with: + node-version: ${{ matrix.node-version }} + - name: Cache Node.js modules + uses: actions/cache@v3.3.1 + with: + path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + key: ${{ runner.OS }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node-${{ matrix.node-version }} + ${{ runner.OS }}- + - name: Install dependencies + run: npm ci + - name: Build the project + run: npm run build --if-present