File tree Expand file tree Collapse file tree 3 files changed +111
-107
lines changed Expand file tree Collapse file tree 3 files changed +111
-107
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches :
6+ - dev
7+ - main
8+ pull_request :
9+ branches :
10+ - " *"
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-22.04
15+ steps :
16+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
17+ - uses : actions/checkout@v2
18+
19+ - name : Log in to registry
20+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
21+
22+ - name : Download Docker cache image (if available)
23+ run : docker pull ghcr.io/$GITHUB_REPOSITORY/build-cache || true
24+
25+ - name : Build the Docker image
26+ run : |
27+ git fetch --prune --unshallow --tags
28+ docker build . -t pyaleph-node:${GITHUB_REF##*/} -f deployment/docker-build/pyaleph.dockerfile --cache-from=ghcr.io/$GITHUB_REPOSITORY/build-cache
29+
30+ - name : Push the image to the cache
31+ # It's not possible to push packages from fork PRs.
32+ if : github.event.pull_request.head.repo.full_name == github.repository
33+ run : |
34+ docker tag pyaleph-node:${GITHUB_REF##*/} ghcr.io/$GITHUB_REPOSITORY/build-cache
35+ docker push ghcr.io/$GITHUB_REPOSITORY/build-cache
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Test/Coverage with Python
2+
3+ on :
4+ push :
5+ branches :
6+ - dev
7+ - main
8+ pull_request :
9+ branches :
10+ - " *"
11+
12+ jobs :
13+ tests :
14+ runs-on : ubuntu-22.04
15+ services :
16+ postgres :
17+ image : postgres:15.1
18+ ports :
19+ - 5432:5432
20+ env :
21+ POSTGRES_USER : aleph
22+ POSTGRES_PASSWORD : decentralize-everything
23+ POSTGRES_DATABASE : aleph
24+ redis :
25+ image : redis:7.0.10
26+ ports :
27+ - 127.0.0.1:6379:6379
28+
29+
30+ steps :
31+ - uses : actions/checkout@v4
32+ with :
33+ # Fetch the whole history for all tags and branches (required for aleph.__version__)
34+ fetch-depth : 0
35+
36+ - name : Set up Python 3.11
37+ id : setup-python
38+ uses : actions/setup-python@v2
39+ with :
40+ python-version : 3.11
41+
42+ - name : Install latest Rust nightly toolchain
43+ uses : actions-rs/toolchain@v1
44+ with :
45+ toolchain : nightly
46+ override : true
47+
48+ - name : Set rust to nightly
49+ run : |
50+ rustup default nightly # Required to build some dependencies
51+
52+ - name : Cache dependencies
53+ uses : actions/cache@v4
54+ with :
55+ path : ~/.cache/pip
56+ key : ${{ runner.os }}-pytest-${{ hashFiles('pyproject.toml') }}
57+ restore-keys : |
58+ ${{ runner.os }}-pytest-${{ hashFiles('pyproject.toml') }}
59+
60+ - run : |
61+ pip install hatch coverage
62+
63+ - run : |
64+ sudo cp .github/openssl-ci.cnf /etc/ssl/openssl.cnf
65+ export OPENSSL_CONF=/etc/ssl/openssl.cnf
66+ touch config.yml # Fake config file for alembic
67+ # TODO: determine why ResourceWarning warnings occur in some tests.
68+ hatch run testing:test
69+
70+ - run : |
71+ hatch run testing:cov
72+
73+ 74+ with :
75+ token : ${{ secrets.CODECOV_TOKEN }}
76+ slug : aleph-im/aleph-sdk-python
You can’t perform that action at this time.
0 commit comments