Skip to content

Commit

Permalink
chore(ci): auto format Github workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Nov 8, 2021
1 parent 1c989ad commit ca3df69
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 82 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-mod

- name: Run build
run: make build

publish-code-coverage:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -88,27 +88,22 @@ jobs:
docker-build-n-push:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: chainsafe/gossamer:latest
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
4 changes: 2 additions & 2 deletions .github/workflows/code-cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
- uses: codecov/codecov-action@v1
with:
if_ci_failed: success
informational: true
informational: true
files: ./coverage.out
flags: unit-tests
name: coverage
verbose: true
verbose: true
17 changes: 8 additions & 9 deletions .github/workflows/docker-grandpa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ jobs:
docker-grandpa-tests:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build

- name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
Expand All @@ -24,7 +23,7 @@ jobs:
platforms: linux/amd64
push: false
tags: chainsafe/gossamer:test
-
name: Run grandpa

- name: Run grandpa
run: |
docker run chainsafe/gossamer:test sh -c "make it-grandpa"
docker run chainsafe/gossamer:test sh -c "make it-grandpa"
45 changes: 22 additions & 23 deletions .github/workflows/docker-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,25 @@ env:

jobs:
docker-polkadotjs-tests:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
load: true
file: ./Dockerfile
target: builder
platforms: linux/amd64
push: false
tags: chainsafe/gossamer:test
-
name: Run polkadotjs tests
run: |
docker run chainsafe/gossamer:test sh -c "make it-polkadotjs"
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
load: true
file: ./Dockerfile
target: builder
platforms: linux/amd64
push: false
tags: chainsafe/gossamer:test

- name: Run polkadotjs tests
run: |
docker run chainsafe/gossamer:test sh -c "make it-polkadotjs"
17 changes: 8 additions & 9 deletions .github/workflows/docker-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ jobs:
docker-rpc-tests:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build

- name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
Expand All @@ -24,7 +23,7 @@ jobs:
target: builder
push: false
tags: chainsafe/gossamer:test
-
name: Run rpc tests

- name: Run rpc tests
run: |
docker run chainsafe/gossamer:test sh -c "make it-rpc"
docker run chainsafe/gossamer:test sh -c "make it-rpc"
17 changes: 8 additions & 9 deletions .github/workflows/docker-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ jobs:
docker-stable-tests:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build

- name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
Expand All @@ -24,7 +23,7 @@ jobs:
platforms: linux/amd64
push: false
tags: chainsafe/gossamer:test
-
name: Run stable tests

- name: Run stable tests
run: |
docker run chainsafe/gossamer:test sh -c "make it-stable"
docker run chainsafe/gossamer:test sh -c "make it-stable"
17 changes: 8 additions & 9 deletions .github/workflows/docker-stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ jobs:
docker-stress-tests:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build

- name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
Expand All @@ -24,7 +23,7 @@ jobs:
platforms: linux/amd64
push: false
tags: chainsafe/gossamer:test
-
name: Run stress

- name: Run stress
run: |
docker run chainsafe/gossamer:test sh -c "make it-stress"
docker run chainsafe/gossamer:test sh -c "make it-stress"
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
- name: Checkout main
uses: actions/checkout@v2

- name: Deploy docs
Expand All @@ -18,4 +18,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_DOMAIN: gossamer.chainsafe.io
CONFIG_FILE: docs/mkdocs.yml
EXTRA_PACKAGES: build-base
EXTRA_PACKAGES: build-base
7 changes: 3 additions & 4 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
Expand All @@ -39,20 +39,19 @@ jobs:
docker build -f=Dockerfile.staging . --progress=plain -t=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG --build-arg chain=$CHAIN --build-arg DD_API_KEY=$DD_API_KEY
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Render Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: .github/workflows/staging/${{ matrix.chain }}-taskdef.json
container-name: gossamer-${{ matrix.chain }}
image: ${{ steps.build-image.outputs.image }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: gossamer-${{ matrix.chain }}-svc
cluster: gossamer-stg
wait-for-service-stability: true

4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
Expand Down Expand Up @@ -60,4 +60,4 @@ jobs:
run: make test-state-race

- name: Run build
run: make build
run: make build

0 comments on commit ca3df69

Please sign in to comment.