Skip to content

Commit

Permalink
do not run go workflow when its docs or infra (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
alabdao authored Jul 21, 2023
1 parent 9538de2 commit e233d68
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 31 deletions.
64 changes: 35 additions & 29 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,46 @@ name: Go

on:
push:
branches: [ "main" ]
branches: ["main"]
paths-ignore:
- 'docs/**'
- 'infrastructure/**'
pull_request:
branches: [ "main" ]
branches: ["main"]
paths-ignore:
- 'docs/**'
- 'infrastructure/**'

jobs:

test:
runs-on: ubuntu-20.04
environment: ci
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20.3
- name: Install dependencies
run: go mod download

- name: Build
run: go build

- name: Test
run: go test ./... -v

- name: Run Equibind
run: |
result_dir=$(./plex create -t tools/equibind.json -i testdata/binding/pdbbind_processed_size1 --autoRun=true -a test -a ci | grep 'Finished processing, results written to' | sed -n 's/^.*Finished processing, results written to //p' | sed 's/\/io.json//')
cd "$result_dir/entry-0/outputs"
if [ "$(find . -name '*docked.sdf' | grep 'docked.sdf')" == "" ]; then
echo "No docked files found"
exit 1
else
echo "Docked files found:"
find . -name '*docked.sdf' | grep 'docked.sdf'
fi
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20.3

- name: Install dependencies
run: go mod download

- name: Build
run: go build

- name: Test
run: go test ./... -v

- name: Run Equibind
run: |
result_dir=$(./plex create -t tools/equibind.json -i testdata/binding/pdbbind_processed_size1 --autoRun=true -a test -a ci | grep 'Finished processing, results written to' | sed -n 's/^.*Finished processing, results written to //p' | sed 's/\/io.json//')
cd "$result_dir/entry-0/outputs"
if [ "$(find . -name '*docked.sdf' | grep 'docked.sdf')" == "" ]; then
echo "No docked files found"
exit 1
else
echo "Docked files found:"
find . -name '*docked.sdf' | grep 'docked.sdf'
fi
4 changes: 2 additions & 2 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
else
echo "CurrentPlexVersion in cmd/upgrade.go ($current_version) matches tag ($tag_name)"
fi
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Download release file
run: curl -sSL https://github.com/labdao/plex/releases/download/${{ steps.tag_name.outputs.tag }}/plex_${{ steps.tag_name.outputs.release }}_linux_amd64.tar.gz -o plex_${{ steps.tag_name.outputs.release }}_linux_amd64.tar.gz

- name: Extract release file
run: tar -xvzf plex_${{ steps.tag_name.outputs.release }}_linux_amd64.tar.gz

Expand Down

0 comments on commit e233d68

Please sign in to comment.