Skip to content

Merge

Merge #57

Workflow file for this run

name: Merge
on:
push:
schedule:
- cron: "0 10 * * *"
env:
CARGO_TERM_COLOR: always
slack-channel: 'alerts'
concurrency:
group: "${{ github.ref }}-${{ github.workflow }}"
cancel-in-progress: true
jobs:
lint_grid_ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Lint Grid UI
run: just ci-lint-ui
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
test_grid_ui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Grid UI Tests
run: just ci-test-ui
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
lint_grid:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Run Lint/Clippy on Grid
run: just ci-lint
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
unit_test_grid:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Unit Test Grid
run: just ci-test
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
lint_openapi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Lint OpenAPI files
run: just ci-lint-openapi
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
integration_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Integration Tests
run: just ci-test-integration
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
lint_dockerfiles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Run hadolint on Grid Dockerfiles
run: just ci-lint-dockerfiles
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
build_docker:
runs-on: ubuntu-latest
if: >-
github.repository_owner == 'hyperledger'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Test Docker Build
run: just docker-build
- name: Copy Artifacts
run: docker-compose -f docker/compose/copy-artifacts.yaml up
- name: Archive Artifacts
run: zip -r grid.zip build/*
- uses: actions/upload-artifact@v2
with:
name: grid
path: grid.zip
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
publish_artifacts:
needs: [lint_grid_ui, test_grid_ui, lint_grid, unit_test_grid, integration_tests, lint_dockerfiles, build_docker]
if: >-
github.repository_owner == 'hyperledger'
runs-on: ubuntu-latest
steps:
- name: Display envvars
run: env
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- uses: actions/download-artifact@v2
with:
name: grid
- name: Upload Artifacts To S3
run: |
export BRANCH=$(echo $GITHUB_REF | awk -F'/' '{ print $NF }')
echo $BRANCH
aws s3 cp ./grid.zip s3://${{ secrets.AWS_S3_BUCKET }}/grid/$BRANCH/
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}