fix(deps): update dependency @hello.nrfcloud.com/proto to v15.3.1 #1591
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: Test and Release | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci --no-audit | |
- name: Compile TypeScript | |
run: npx tsc | |
- name: Check source code with eslint | |
run: npx eslint ./ | |
- name: Check if source code is properly formatted | |
run: npx prettier -c ./ | |
- name: Run tests | |
run: npm test | |
- name: Ensure it builds | |
env: | |
REGISTRY_ENDPOINT: https://example.com/ | |
run: | | |
npm run build | |
e2e-tests: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
environment: ci | |
container: mcr.microsoft.com/playwright:v1.46.1 | |
env: | |
MAP_REGION: ${{ vars.MAP_REGION }} | |
MAP_NAME: ${{ vars.MAP_NAME }} | |
MAP_API_KEY: ${{ vars.MAP_API_KEY }} | |
# Note: It's currently not possible to run test for multiple browsers in | |
# parallel since the `webServer` cannot be defined per project: | |
# https://github.com/microsoft/playwright/issues/22496 | |
# However the mock backend server state is manipulated during test runs and | |
# therefore cannot be used in parallel. | |
strategy: | |
matrix: | |
browser: | |
- chromium | |
- firefox | |
- webkit | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci --no-audit --force | |
- name: Run Playwright tests | |
env: | |
HOME: /root | |
run: npx playwright test -x --project ${{ matrix.browser }} | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report-${{ matrix.browser }} | |
path: playwright-report/ | |
retention-days: 7 | |
release: | |
if: github.ref == 'refs/heads/saga' | |
permissions: | |
actions: write | |
contents: write | |
needs: | |
- tests | |
- e2e-tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Semantic release | |
continue-on-error: true | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Trigger deployment workflow | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh workflow run deploy.yaml |