Skip to content

Commit

Permalink
trying stripped down actions file
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Mar 6, 2024
1 parent eedb134 commit 8968dab
Showing 1 changed file with 1 addition and 57 deletions.
58 changes: 1 addition & 57 deletions .github/workflows/materialization_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ jobs:
test:
name: Test against different Python versions
runs-on: ubuntu-latest

services:
postgres:
image: postgis/postgis:13-master
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_aligned_volume
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
Expand All @@ -42,49 +31,4 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/test_requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
python-version: 3.9
- name: Install dependencies
shell: bash -l {0}
run: |
pip install flake8 pytest
pip install -r requirements.txt
if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi
- name: Lint with flake8
shell: bash -l {0}
run: |
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
shell: bash -l {0}
run: |
pytest
deploy:
name: Tag a new version and push tag
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- name: git checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: bumpversion
shell: bash -l {0}
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
pip install bumpversion
bumpversion patch
git push
git push --tags
TAG=$(git describe --tags)
echo "tag=$TAG" >> $GITHUB_ENV

0 comments on commit 8968dab

Please sign in to comment.