1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- name: Node.js CI
- on:
- pull_request:
- branches: [ main ]
- push:
- branches: [ main ]
- permissions:
- contents: read
- jobs:
- test:
- name: Test
- runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [14.x, 16.x, 18.x ]
- steps:
- - uses: actions/checkout@v3
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
- - uses: actions/cache@v3
- with:
- path: ~/.npm
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
- - run: npm ci
- name: Install dependencies
- - name: Test
- env:
- NCM_API_TEST_LOGIN_COUNTRY_CODE: ${{ secrets.NCM_API_TEST_LOGIN_COUNTRY_CODE }}
- NCM_API_TEST_LOGIN_PHONE: ${{ secrets.NCM_API_TEST_LOGIN_PHONE }}
- NCM_API_TEST_LOGIN_PASSWORD: ${{ secrets.NCM_API_TEST_LOGIN_PASSWORD }}
- run: npm test
- lint:
- name: Lint
- runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [14.x]
- steps:
- - uses: actions/checkout@v3
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
- - uses: actions/cache@v3
- with:
- path: ~/.npm
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
- - run: npm ci
- name: Install dependencies
- - name: Lint
- run: npm run lint
|