-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
16 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
version: 2 | ||
|
||
|
||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
--- | ||
name: Test code quality | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
|
||
|
||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install pip and hatch | ||
run: | | ||
sudo apt-get install -y python3-pip | ||
pip3 install hatch hatch-vcs | ||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-code-quality-${{ hashFiles('pyproject.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-code-quality-${{ hashFiles('pyproject.toml') }} | ||
- name: Run Hatch lint | ||
run: hatch run linting:all |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
--- | ||
name: Test nix-shell | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
- 'doesnt_exist' | ||
|
||
|
||
jobs: | ||
nix-shell: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Fetch the whole history for all tags and branches (required for aleph.__version__) | ||
fetch-depth: 0 | ||
|
||
- name: Set up Nix | ||
uses: cachix/install-nix-action@v27 | ||
with: | ||
# Use channel nixos-23.11 for Linux and nixpkgs-23.11-darwin for macOS | ||
nix_path: nixpkgs=channel:${{ matrix.os == 'macos-latest' && 'nixpkgs-24.05-darwin' || 'nixos-24.05' }} | ||
|
||
- name: Run tests | ||
run: nix-shell --run "hatch run testing:test -- ./src/ ./test/" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
name: Test/Coverage with Python | ||
|
||
|
||
on: | ||
push: | ||
branches: | ||
|
@@ -8,6 +10,8 @@ on: | |
pull_request: | ||
branches: | ||
- "*" | ||
|
||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-22.04 | ||
|
@@ -24,24 +28,29 @@ jobs: | |
image: redis:7.0.10 | ||
ports: | ||
- 127.0.0.1:6379:6379 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Fetch the whole history for all tags and branches (required for aleph.__version__) | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.12 | ||
id: setup-python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Install latest Rust nightly toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- name: Set rust to nightly | ||
run: | | ||
rustup default nightly # Required to build some dependencies | ||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
|
@@ -55,14 +64,17 @@ jobs: | |
sudo apt-get install -y libpq-dev libsodium-dev libgmp-dev | ||
- run: | | ||
pip install hatch coverage | ||
- run: | | ||
sudo cp .github/openssl-ci.cnf /etc/ssl/openssl.cnf | ||
export OPENSSL_CONF=/etc/ssl/openssl.cnf | ||
touch config.yml # Fake config file for alembic | ||
# TODO: determine why ResourceWarning warnings occur in some tests. | ||
hatch run testing:test | ||
- run: | | ||
hatch run testing:cov | ||
- uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
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
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
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
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
Oops, something went wrong.