From 9f798b48a88459b66a44cc07e1915702a6700e69 Mon Sep 17 00:00:00 2001 From: Edwardofc <150191327+Edwardofc@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:43:21 -0500 Subject: [PATCH] Create node.js.yml --- .github/workflows/node.js.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..89d0e9f --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,30 @@ +#Este flujo de trabajo realizará una instalación limpia de las dependencias del nodo, las almacenará en caché/restaurará, creará el código fuente y ejecutará pruebas en diferentes versiones del nodo. +# Para obtener más información, consulte: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test