Skip to content

Commit

Permalink
Asdf support (#159)
Browse files Browse the repository at this point in the history
* asdf support take 1

* asdf support take 2

* Added asdf support

* whoops

* add shell

* Added stdin token

* registry login

* both need to be on asdf-support

* asdf all the things

* infer tool versions

* bash of course

* blah

* fixed mockery versioning

* forced rename based on mockery issue

* golang ci lint version

* no dash

* reorganize and simplify

* use posix space

* version and not buf_version

* update to v4

* all to asdf support

* v4 of download artifact

* move to v0 tag
  • Loading branch information
dcbickfo authored Mar 26, 2024
1 parent b597939 commit cda70be
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-version-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git config
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
Expand All @@ -22,7 +22,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
milliseconds: 1000
2 changes: 1 addition & 1 deletion cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
runs:
using: 'composite'
steps:
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ inputs.DEPLOY_CACHE_PATH }}
key: ${{ inputs.DEPLOY_CACHE_KEY }}
2 changes: 1 addition & 1 deletion deploy/eks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ runs:
aws-access-key-id: ${{ inputs.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ inputs.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ inputs.AWS_REGION }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cleaning workspace
shell: bash
run: shopt -s dotglob && rm -rf "${{ github.workspace }}"/*
Expand Down
2 changes: 1 addition & 1 deletion deploy/lambda/go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
runs:
using: 'composite'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cleaning workspace
shell: bash
run: shopt -s dotglob && rm -rf "${{ github.workspace }}"/*
Expand Down
9 changes: 8 additions & 1 deletion go/configure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,23 @@ runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: ${{ inputs.FETCH_DEPTH }}
- name: Setting up private modules access
shell: bash
run: git config --global url."https://${{ inputs.FLIPPCIRCLECIPULLER_REPO_TOKEN }}:[email protected]/wishabi".insteadOf "https://github.com/wishabi"
- name: Grab buf version
if: ${{ hashFiles('.tool-versions') != '' }}
run: |
BUF_VERSION=$(awk '/^buf[[:space:]]+/ {print $2}' .tool-versions)
echo "BUF_VERSION=${BUF_VERSION}" >> $GITHUB_ENV
shell: bash
- name: Setting up buf
uses: bufbuild/buf-setup-action@v1
if: "${{ inputs.BUF_BUILD_API_TOKEN != '' }}"
with:
github_token: ${{ inputs.FLIPPCIRCLECIPULLER_REPO_TOKEN }}
buf_user: ${{ inputs.BUF_BUILD_USER }}
buf_api_token: ${{ inputs.BUF_BUILD_API_TOKEN }}
version: ${{ env.BUF_VERSION }}
15 changes: 13 additions & 2 deletions go/deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
steps:
- name: Restoring vendor modules from cache
id: vendor-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor
key: vendor-cache-${{ hashFiles('go.mod','go.sum') }}
Expand All @@ -36,9 +36,20 @@ runs:
- name: Run go generate
run: go generate ./...
shell: bash
- name: Grab mockery version
if: ${{ hashFiles('.tool-versions') != '' }}
run: |
MOCKERY_INSTALL_VERSION=$(awk '/^mockery[[:space:]]+/ {print "v"$2}' .tool-versions)
echo "MOCKERY_INSTALL_VERSION=${MOCKERY_INSTALL_VERSION}" >> $GITHUB_ENV
shell: bash
- name: Install mockery
if: ${{ hashFiles('.mockery.yml') != '' }}
run: go install github.com/vektra/mockery/v2
run: |
if [ -n "${{ env.MOCKERY_INSTALL_VERSION }}" ]; then
go install github.com/vektra/mockery/v2@${{ env.MOCKERY_INSTALL_VERSION }}
else
go install github.com/vektra/mockery/v2
fi
shell: bash
- name: Generate mocks
if: ${{ hashFiles('.mockery.yml') != '' }}
Expand Down
10 changes: 8 additions & 2 deletions go/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,18 @@ runs:
- name: Setup safe directory
shell: bash
run: git config --global --add safe.directory ${{ inputs.WORKSPACE || github.workspace }}
- name: Grab golangci-lint version
if: ${{ hashFiles('.tool-versions') != '' }}
run: |
GOLANGCI_LINT_VERSION=$(awk '/^golangci-lint[[:space:]]+/ {print "v"$2}' .tool-versions)
echo "GOLANGCI_LINT_VERSION=${GOLANGCI_LINT_VERSION}" >> $GITHUB_ENV
shell: bash
- name: Run Go linter
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
skip-cache: true
args: --verbose
version: ${{ inputs.GOLANG_CI_LINT_VERSION }} # Optional - if blank, will use the action's default version resolution
version: ${{ env.GOLANGCI_LINT_VERSION || inputs.GOLANG_CI_LINT_VERSION }} # Optional - if blank, will use the action's default version resolution
- name: Notify slack channel on failure
if: failure() && inputs.SLACK_CHANNEL_ID != null && github.ref == 'refs/heads/main'
uses: slackapi/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions go/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ runs:
shell: bash
run: ${GITHUB_ACTION_PATH}/test.sh "${{ inputs.TAGS }}" "${{ inputs.TIMEOUT }}"
- name: Uploading test report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "${{ github.sha }}-test-report.out"
path: "./test-report.out"
retention-days: 1
- name: Uploading coverage report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "${{ github.sha }}-coverage.out"
path: "./coverage.out"
Expand Down
2 changes: 1 addition & 1 deletion ruby/deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runs:
steps:
- name: Bundle cache
id: bundle-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor/bundle
key: rails-${{ hashFiles('Gemfile.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion ruby/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
env:
BUNDLE_DEPLOYMENT: true
- name: 'Upload rubocop results'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "${{ github.sha }}-lint-results.out"
path: ./rubocop/rubocop.json
Expand Down
2 changes: 1 addition & 1 deletion ruby/one-for-all/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
using: "composite"
steps:
- name: Download test result
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}-test-report.out
path: ./result/
Expand Down
4 changes: 2 additions & 2 deletions ruby/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ runs:
run: |
sed -i 's@${{ env.ROOT_PATH }}''@/github/workspace/@g' coverage.json
- name: 'Upload coverage'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-coverage.out
path: ./coverage/coverage.json
retention-days: 1
- name: 'Upload test results'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-test-report.out
path: ./result/rspec.xml
Expand Down
8 changes: 4 additions & 4 deletions sonarqube-scan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set branch variable
Expand All @@ -39,16 +39,16 @@ runs:
run: echo "short_sha=`echo ${GITHUB_SHA::7}`" > $GITHUB_OUTPUT
shell: bash
- name: Downloading test report
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "${{ github.sha }}-test-report.out"
- name: Downloading coverage report
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "${{ github.sha }}-coverage.out"
- name: Download linter results
if: ${{ inputs.CHECK_LINTER == 'true' }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "${{ github.sha }}-lint-results.out"
- name: SonarQube Scan
Expand Down

0 comments on commit cda70be

Please sign in to comment.