Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Re-enable devshell-tests CI job #374

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 35 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,60 +193,51 @@ jobs:
K8S_SERVER: ${{ secrets.K8S_SERVER }}
K8S_SA_TOKEN: ${{ secrets.K8S_SA_TOKEN }}

#devshell-tests:
# needs: build
# strategy:
# matrix:
# os: [nixos, macos]
# runs-on:
# - self-hosted
# - ${{ matrix.os }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# ref: ${{ github.event.pull_request.head.sha || github.sha }}
# - name: Acquire AWS credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: ${{ secrets.AWS_ROLE_ARN_ }}
# aws-region: ${{ env.AWS_REGION }}
# - name: Add signing key for nix
# run: echo "${{ secrets.NIX_SIGNING_KEY }}" > "${{ runner.temp }}/nix-key"
# - name: Run nixci to build/test all outputs
# run: |
# nix run github:srid/nixci -- -v build -- --fallback > /tmp/outputs
# - name: Copy nix scopes to nix cache
# run: |
# nix-store --stdin -q --deriver < /tmp/outputs | nix-store --stdin -qR --include-outputs \
# | nix copy --stdin --to \
# "s3://cache.sc.iog.io?secret-key=${{ runner.temp }}/nix-key&region=$AWS_DEFAULT_REGION" \
# && rm /tmp/outputs
devshell-tests:
needs: build
strategy:
matrix:
os: [nixos, macos]
runs-on:
- self-hosted
- ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Acquire AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_ }}
aws-region: ${{ env.AWS_REGION }}
- name: Add signing key for nix
run: echo "${{ secrets.NIX_SIGNING_KEY }}" > "${{ runner.temp }}/nix-key"
- name: Run nixci to build/test all outputs
run: |
nix run github:srid/nixci -- -v build -- --fallback > /tmp/outputs
- name: Copy nix scopes to nix cache
run: |
nix-store --stdin -q --deriver < /tmp/outputs | nix-store --stdin -qR --include-outputs \
| nix copy --stdin --to \
"s3://cache.sc.iog.io?secret-key=${{ runner.temp }}/nix-key&region=$AWS_DEFAULT_REGION" \
&& rm /tmp/outputs

pre-merge-checks-complete:
if: ${{ always() && (github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == false)) }}
# needs: [build, local-environment-tests, devshell-tests]
needs: [build, local-environment-tests]
needs: [build, local-environment-tests, devshell-tests]
runs-on: ubuntu-latest
steps:
- name: Check if any needed job failed
run: |
# if [[ "${{ needs.build.result }}" != "success" ||
# "${{ needs.local-environment-tests.result }}" != "success" ||
# "${{ needs.devshell-tests.result }}" != "success" ]]; then
# echo "One or more needed jobs failed."
# exit 1
# else
# echo "All needed jobs passed."
# fi

if [[ "${{ needs.build.result }}" != "success" ||
"${{ needs.local-environment-tests.result }}" != "success" ]]; then
echo "Build or local-environment-tests failed."
"${{ needs.local-environment-tests.result }}" != "success" ||
"${{ needs.devshell-tests.result }}" != "success" ]]; then
echo "One or more needed jobs failed."
exit 1
else
echo "All required jobs passed."
echo "All needed jobs passed."
fi

upload-chain-specs:
Expand Down
Loading