test: add confDir test and fix linting in integration spec #340
Workflow file for this run
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Required for local tests | |
| - name: Setup MetaCall CLI | |
| run: wget -O - https://raw.githubusercontent.com/metacall/install/master/install.sh | sh | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: https://registry.npmjs.org | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Installing Dependencies | |
| run: npm i | |
| - name: Lint | |
| run: npm run lint | |
| - name: Build | |
| run: npm run build | |
| - name: Run Tests (production) | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| echo 'METACALL_AUTH_EMAIL="${{ secrets.METACALL_AUTH_EMAIL }}"' > .env | |
| echo 'METACALL_AUTH_PASSWORD="${{ secrets.METACALL_AUTH_PASSWORD }}"' >> .env | |
| npm run coverage | |
| # # TODO: This depends on: https://github.com/metacall/faas/issues/78 | |
| # - name: Run Tests (local) | |
| # run: | | |
| # cd .. | |
| # git clone https://github.com/metacall/faas.git | |
| # cd faas | |
| # npm install | |
| # npm run build | |
| # node dist/index.js --version | |
| # cd ../deploy | |
| # export TEST_DEPLOY_LOCAL="true" | |
| # node ../faas/dist/index.js & | |
| # sleep 10 | |
| # mv .env.example .env | |
| # npm run coverage | |
| - name: Publish | |
| uses: JS-DevTools/npm-publish@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| access: 'public' | |
| token: '${{ secrets.NPM_AUTH_TOKEN }}' |