diff --git a/.github/workflows/go-action.yml b/.github/workflows/go-action.yml index 44c12ac..448bfe1 100644 --- a/.github/workflows/go-action.yml +++ b/.github/workflows/go-action.yml @@ -1,31 +1,18 @@ -name: 'build-test' -on: # rebuild any PRs and main branch changes - pull_request: - branches: - - main - - 'releases/*' - push: - branches: - - main - - 'releases/*' +name: Go Action detection of dependencies +on: + push jobs: - build: + go-action-detection: runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: 'Checkout Repository' uses: actions/checkout@v3 - - - name: Install Node - uses: actions/setup-node@v3 + - uses: actions/setup-go@v3 with: - node-version: 16 - registry-url: 'https://npm.pkg.github.com' - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - - run: npm ci --ignore-scripts - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - - run: npm rebuild && npm run all + go-version: ">=1.18.0" + - name: Run snapshot action + uses: dsp-testing/go-snapshot-action@main + with: + go-mod-path: go-example/go.mod + go-build-target: go-example/cmd/octocat.go diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 429cba4..44c12ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,13 +10,22 @@ on: # rebuild any PRs and main branch changes - 'releases/*' jobs: - build: # make sure build/ci work properly + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: | - npm ci - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - run: | - npm run all + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: 'https://npm.pkg.github.com' + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + + - run: npm ci --ignore-scripts + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + + - run: npm rebuild && npm run all