OsmosysSoftware / dev-standards

Documentation for all the development category standards followed at Osmosys
2 stars 11 forks source link

Add node installation step in CI #31

Closed vikas-kyatannawar closed 8 months ago

vikas-kyatannawar commented 10 months ago

Add node installation step with specific node version in angular CI Setup or any node project.

https://github.com/OsmosysSoftware/dev-standards/blob/main/ci-setups/angular-github.md

name: Standard Angular App Flow

on:
  pull_request:
    branches: [ "main", "development" ]

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '18'  # Adjust this to the Node.js version you need

      - name: Install dependencies
        run: npm install

      - name: Run linting
        run: npm run lint

  build:
    name: Build
    runs-on: ubuntu-latest
    needs: lint
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '18'  # Adjust this to the Node.js version you need

      - name: Install dependencies
        run: npm install

      - name: Build app
        run: npm run build
osm-vishnukyatannawar commented 10 months ago

@vikas-kyatannawar

If you mean Node installation steps then I would not cover that in this document. And it is added under prerequisites.

https://github.com/OsmosysSoftware/dev-standards/blob/main/ci-setups/angular-github.md#2-prerequisites

xixas commented 10 months ago

@osm-vishnukyatannawar No I am talking in CI config. Like I mentioned config in the comment above.

 - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '18'  # Adjust this to the Node.js version you need
osm-vishnukyatannawar commented 9 months ago

Can someone give a PR for this?

@vikas-kyatannawar @ashutosh-bisoyi ?

ashutosh-bisoyi commented 9 months ago

I'll look into this in the coming week

ashutosh-bisoyi commented 8 months ago

@osm-vishnukyatannawar I have tested and added the node installation step. Here are the PRs

  1. For the guide doc: https://github.com/OsmosysSoftware/dev-standards/pull/39
  2. For standard app: https://github.com/OsmosysSoftware/angular-eslint-workflow-guide/pull/3
osm-vishnukyatannawar commented 8 months ago

This is addressed in above mentioned PRs.