Bump actions/setup-node from 4.0.3 to 4.0.4 #102
Workflow file for this run
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 workflow will do a clean install of the dependencies and run tests across different versions | ||
# | ||
# Replace <track> with the track name | ||
# Replace <image-name> with an image to run the jobs on | ||
# Replace <action to setup tooling> with a github action to setup tooling on the image | ||
# Replace <install dependencies> with a cli command to install the dependencies | ||
# Replace <code-extensions> with file extensions that should trigger the workflow | ||
# | ||
# Requires scripts: | ||
# - scripts/pr-check path/to/changed/file path/to/changed/file | ||
# - scripts/pr path/to/changed/file path/to/changed/file | ||
name: solidity / pr | ||
on: pull_request | ||
jobs: | ||
precheck: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | ||
- name: Use Node.js LTS (12.x) | ||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 | ||
with: | ||
# Here, use the LTS/stable version of the track's tooling, e.g.: | ||
# node-version: 12.x | ||
- name: Install project dependencies | ||
run: yarn | ||
# Replace <code-extensions> with file extensions that should trigger this check. Replace with .* to allow anything. | ||
- name: Run exercism/solidity ci pre-check (stub files, config integrity) for changed exercises | ||
run: | | ||
PULL_REQUEST_URL=$(jq -r ".pull_request.url" "$GITHUB_EVENT_PATH") | ||
curl --url $"${PULL_REQUEST_URL}/files" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | \ | ||
jq -c '.[] | select(.status == "added" or .status == "modified") | select(.filename | match("\\.(sol|js|md|json)$")) | .filename' | \ | ||
xargs -r bin/pr-check | ||
ci: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
# Here, add all SUPPORTED versions only, e.g.: | ||
version: [10.x, 12.x, 14.x] | ||
# Optionally, add more matrix variables, such as os or arch | ||
steps: | ||
- name: Use Node ${{ matrix.version }} | ||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 | ||
- name: Install project dependencies | ||
run: yarn | ||
# Replace <code-extensions> with file extensions that should trigger running tests. Replace with .* to allow anything. | ||
- name: Run exercism/solidity ci (runs tests) for changed/added exercises | ||
run: | | ||
PULL_REQUEST_URL=$(jq -r ".pull_request.url" "$GITHUB_EVENT_PATH") | ||
curl --url $"${PULL_REQUEST_URL}/files" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | \ | ||
jq -c '.[] | select(.status == "added" or .status == "modified") | select(.filename | match("\\.(sol|js|md|json)$")) | .filename' | \ | ||
xargs -r bin/pr |