CTX-4629: Renamed project to task #166
Workflow file for this run
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: Unit tests | |
on: | |
push: | |
branches: | |
- main | |
- stage | |
- develop | |
pull_request: | |
types: [opened, reopened, synchronize] | |
branches: | |
- main | |
- stage | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: ${{ github.base_ref == '' && github.ref_name || github.base_ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.8" | |
- name: Print environment | |
run: | | |
echo ${{ github.base_ref == '' && github.ref_name || github.base_ref }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip pipenv wheel | |
pipenv install --dev | |
- name: Build wheel | |
run: | | |
pipenv run python -m build | |
- name: Run unit tests | |
# Re-enable when we implement secure workflow with secrets | |
# env: | |
# CTX_USERNAME: ${{ secrets.CTX_USERNAME }} | |
# CTX_PASSWORD: ${{ secrets.CTX_PASSWORD }} | |
run: | | |
pipenv run python -m unittest discover tests |