Merge pull request #88 from wanadev/dependabot/github_actions/actions… #171
This file contains hidden or 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: "Tests" | |
| on: | |
| push: | |
| paths: | |
| - "lib/**" | |
| - "server/**" | |
| - "test/**" | |
| - ".github/workflows/tests.yml" | |
| - "package.json" | |
| - "package-lock.json" | |
| pull_request: | |
| paths: | |
| - "lib/**" | |
| - "server/**" | |
| - "test/**" | |
| - ".github/workflows/tests.yml" | |
| - "package.json" | |
| - "package-lock.json" | |
| jobs: | |
| build: | |
| name: "Run tests" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout the repository" | |
| uses: actions/checkout@v6 | |
| - name: "Set up Node 18" | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18 | |
| - name: "Install Node dependencies" | |
| run: | | |
| npm install | |
| - name: "Start the test server" | |
| run: | | |
| npx pm2 start -f test/env/test-server.js --name=obsidian-proxy-server & | |
| - name: "Run lint" | |
| run: | | |
| npm run lint | |
| - name: "Run tests" | |
| run: | | |
| npm run test | |
| - name: "Stop the test server" | |
| run: | | |
| npx pm2 kill | |