-
-
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.
Merge main into sweep/add-sweep-config
- Loading branch information
Showing
5 changed files
with
21 additions
and
18,709 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 |
---|---|---|
|
@@ -7,41 +7,33 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: [x64,ubuntu-latest] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 8 | ||
if: github.event_name == 'push' # Only trigger on pushes | ||
steps: | ||
- name: Check if this is the latest commit | ||
id: latest_commit_check | ||
- name: Checkout code | ||
uses: actions/checkout@v2 # This step checks out your repository's code | ||
|
||
- name: Fetch develop branch | ||
run: git fetch origin develop | ||
|
||
- name: Check for changes in ./src | ||
id: check_changes | ||
run: | | ||
# Use PowerShell syntax for executing commands | ||
$latestCommit = git rev-parse HEAD | ||
$latestRef = git for-each-ref --sort=-committerdate refs/heads/ --format '%(objectname)%(refname)' | Select-Object -First 1 | ForEach-Object { $_.Split(" ")[1] } | ||
if ($latestCommit -eq $latestRef) { | ||
echo "is_latest_commit=true" >> $GITHUB_ENV | ||
} else { | ||
echo "is_latest_commit=false" >> $GITHUB_ENV | ||
} | ||
- name: Paths Changes Filter | ||
uses: dorny/[email protected] | ||
with: | ||
filters: | | ||
src: | ||
- 'src/**' | ||
git diff --quiet origin/develop -- ./src || echo "::set-output name=changes_detected::true" | ||
- name: Skip if no changes in ./src | ||
run: exit 1 | ||
if: steps.check_changes.outputs.changes_detected != 'true' | ||
|
||
- name: Setup Node.js | ||
if: env.is_latest_commit == 'true' | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
node-version: '20.x' # Updated Node.js version | ||
|
||
- name: Install Angular CLI | ||
if: env.is_latest_commit == 'true' | ||
run: yarn global add @angular/cli # Use Yarn to install Angular CLI | ||
|
||
- name: Cache Yarn dependencies | ||
if: env.is_latest_commit == 'true' | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/yarn | ||
|
@@ -50,13 +42,10 @@ jobs: | |
${{ runner.os }}-yarn- | ||
- name: Clear Yarn Cache | ||
if: env.is_latest_commit == 'true' | ||
run: yarn cache clean | ||
|
||
- name: Install dependencies | ||
if: env.is_latest_commit == 'true' | ||
run: yarn install # Use Yarn to install dependencies | ||
|
||
- name: Run tests | ||
if: env.is_latest_commit == 'true' | ||
run: yarn test-headless # Use Yarn to run tests |
Oops, something went wrong.