refactor: singleton services (#381) #1401
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: CI | |
on: [push, pull_request] | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
name: Unit Tests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: npm ci | |
run: npm ci | |
- name: Unit tests | |
run: npm run test:unit | |
e2e-test: | |
runs-on: ubuntu-latest | |
container: ghcr.io/openupm/openupm-cli-e2e-${{ matrix.os }}:latest | |
strategy: | |
matrix: | |
os: | |
- ubuntu | |
# Seems like windows is not supported at the moment (06.2024) | |
# - windows | |
name: E2E Tests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: install deps | |
run: npm ci | |
- name: build | |
run: npm run build | |
- name: run tests | |
run: npx jest --testMatch "**/*.e2e.ts" --runInBand --silent=false | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- unit-test | |
- e2e-test | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: npm install | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Release | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/git | |
branch: master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |