generated from Bullrich/parity-action-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated action dependencies to be in sync with other projects. Updated docker image to be 20
- Loading branch information
Showing
3 changed files
with
31 additions
and
35 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,39 @@ | ||
name: Continuous testing | ||
|
||
on: [pull_request] | ||
on: | ||
pull_request: | ||
push: | ||
branches: ["main"] | ||
|
||
jobs: | ||
lint: | ||
test: | ||
strategy: | ||
matrix: | ||
command: [lint, build, test] | ||
runs-on: ubuntu-latest | ||
name: running ${{ matrix.command }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use node 18 | ||
uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4.1.1 | ||
- uses: actions/setup-node@v4.0.2 | ||
with: | ||
node-version: 18 | ||
- uses: c-hive/gha-yarn-cache@v2 | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- run: yarn run lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use node 18 | ||
uses: actions/setup-node@v3 | ||
node-version: 20 | ||
- name: Cache node modules | ||
id: cache-npm | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
node-version: 18 | ||
- uses: c-hive/gha-yarn-cache@v2 | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- run: yarn run build | ||
- run: yarn run ${{ matrix.command }} | ||
|
||
test: | ||
conclude: | ||
runs-on: ubuntu-latest | ||
name: All tests passed | ||
needs: [test] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use node 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- uses: c-hive/gha-yarn-cache@v2 | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- run: yarn run test | ||
- run: echo '### Good job! All the tests passed 🚀' >> $GITHUB_STEP_SUMMARY |
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
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