name: PR Tests on: pull_request: branches: - main jobs: metadata: runs-on: ubuntu-latest name: Metadata outputs: version: ${{ steps.version.outputs.VERSION }} steps: - name: Check out repository uses: actions/checkout@v3 with: fetch-depth: 0 - name: Get Version id: version shell: bash run: | echo ::set-output name=VERSION::$(git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g') - name: ${{ steps.version.outputs.VERSION }} shell: bash run: | echo ${{ steps.version.outputs.VERSION }} python: name: "Python Tests" runs-on: ubuntu-latest needs: - metadata strategy: matrix: action: - lint - coverage - security-checks steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v3 with: python-version: 3.9 - name: Install Dependencies run: cd api && make setup - name: Echo dependencies run: cd api && ./venv/bin/pip freeze - name: ${{ needs.metadata.outputs.version }} / ${{ matrix.action }} run: cd api && make ${{ matrix.action }} nodejs: name: "NodeJs Tests" runs-on: ubuntu-latest needs: - metadata strategy: matrix: action: - "test:ci" - "build" - "tsc:ci" steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 16 cache: "yarn" cache-dependency-path: webapp/yarn.lock - name: Install Dependencies run: cd webapp && yarn install - name: ${{ needs.metadata.outputs.version }} / ${{ matrix.action }} run: cd webapp && yarn ${{ matrix.action }}