WIP #2
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: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# - name: Configure git | |
# run: | | |
# git config --global url."https://x-oauth-basic:${{ secrets.GITHUB_TOKEN }}@github.com/frontierhq".insteadOf https://github.com/frontierhq | |
- id: get_python_version | |
name: Get Python version | |
run: | | |
set -euo pipefail | |
python_version=$(grep python_version ${GITHUB_WORKSPACE}/Pipfile | cut -d "=" -f2 | sed 's/"//g')) | |
echo "Python version: ${python_version}" | |
echo "python_version=$python_version" >> "$GITHUB_OUTPUT" | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ steps.get_python_version.outputs.python_version }} | |
- name: Setup pipenv | |
run: python -m pip install --upgrade pipenv wheel | |
- id: cache-pipenv | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}-dev | |
- name: Install | |
if: steps.cache-pipenv.outputs.cache-hit != 'true' | |
run: make install_ci | |
- name: Build | |
run: make build | |
- name: Test | |
run: make test |