add header #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "build-test" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- "releases/*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: npm ci | |
- run: npm run format-check | |
- run: npm run lint | |
- run: npm run type-check | |
- run: npm run test | |
- run: npm run build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
# Check the caching feature. | |
test-caching: | |
name: Test caching | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: First Download | |
uses: ./ | |
with: | |
repository: KeisukeYamashita/setup-release-test-repo-public | |
- name: Second Download | |
uses: ./ | |
id: second-setup | |
with: | |
repository: KeisukeYamashita/setup-release-test-repo-public | |
- name: Checked catched or not | |
if: steps.second-setup.outputs.restore-from-cache == 'false' | |
run: exit 1 | |
# Check the caching feature. | |
test-no-caching: | |
name: Test no caching | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: First Download | |
uses: ./ | |
id: first-setup | |
with: | |
repository: KeisukeYamashita/setup-release-test-repo-public | |
- name: Checked catched or not | |
if: steps.first-setup.outputs.restore-from-cache == 'true' | |
run: exit 1 | |
# Check if it can install the latest release. | |
test-latest-linux-amd64: | |
name: Get latest linux amd64 | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: ./ | |
with: | |
repository: KeisukeYamashita/setup-release-test-repo-public | |
- run: setup-release-test-repo-public | |
# Check if it can install specific release. | |
test-tagged-linux-amd64: | |
name: Get v0.1.0 linux amd64 | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: ./ | |
with: | |
repository: KeisukeYamashita/setup-release-test-repo-public | |
tag: v0.1.0 | |
- run: setup-release-test-repo-public | |
# Check if there are no problem installing the same release twice. | |
test-multiple-install: | |
name: Get latest | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: ./ | |
with: | |
repository: KeisukeYamashita/setup-release-test-repo-public | |
- uses: ./ | |
with: | |
repository: KeisukeYamashita/setup-release-test-repo-public | |
# Check if it can install private repos by using the GitHub Token | |
test-private: | |
name: Get Private repository release | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: ./ | |
with: | |
repository: odan-sandbox/setup-release-test-repo-private | |
token: ${{ secrets.CI_TEST_PAT }} | |
- run: which git-pr-release-go | |
# Check if it can install public repos in the wild (Part 1). | |
test-public-repo: | |
name: Get spinaker/kleat | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: ./ | |
with: | |
repository: spinnaker/kleat | |
- run: kleat version |