Repair tests #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify | |
on: | |
push: | |
branches-ignore: | |
- master | |
env: | |
NODE_VERSION: 20 | |
jobs: | |
unit-test: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- name: Install dependencies | |
run: npm install | |
- name: Run Unit tests | |
run: npm run test:unit | |
integration-test: | |
name: Integration Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- name: Install dependencies in root project | |
run: npm install | |
- name: Link from root project | |
run: npm link | |
- name: Install dependencies in nested project | |
run: npm install | |
working-directory: ./integration | |
- name: Link to nested project | |
run: npm link @falbricate/geography | |
working-directory: ./integration | |
- name: Run Integration tests | |
run: npm run test:integration | |
compile: | |
name: Compile | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- name: Install dependencies | |
run: npm install | |
- name: Dry compilation | |
run: npm run compile | |
- name: Dry build | |
run: npm run build |