Skip to content

Commit

Permalink
use githu-comment
Browse files Browse the repository at this point in the history
chore: Update GitHub Actions workflow for installing dependencies and running tests

fix path

fix path2
  • Loading branch information
RyosukeDTomita committed Jun 17, 2024
1 parent 942576b commit f0279e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/react-jest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ defaults:
jobs:
frontend-jest: # job id(Typed by user)
runs-on: ubuntu-latest
defaults:
# デフォルトのワーキングディレクトリのため設定不要だが,明示的に指定。
run:
working-directory: /home/runner/work/devsecops-demo-aws-ecs/devsecops-demo-aws-ecs

steps:
# Checkout repository to runner
Expand All @@ -18,8 +22,15 @@ jobs:
with:
node-version: '20'

- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- name: install package using aqua
uses: aquaproj/aqua-installer@6ce1f8848ec8e61f14d57bd5d7597057a6dd187c # v3.0.1
with:
aqua_version: v2.29.0

- name: Install Dependencies
run: cd /home/runner/work/devsecops-demo-aws-ecs/devsecops-demo-aws-ecs && npm install
run: github-comment exec --token ${{ secrets.TOKEN }} -- npm install

- name: Run npm test
run: cd /home/runner/work/devsecops-demo-aws-ecs/devsecops-demo-aws-ecs && npm test -- --watchAll=false
run: github-comment exec --token ${{ secrets.TOKEN }} -- npm test -- --watchAll=false
7 changes: 5 additions & 2 deletions .github/workflows/react-semgrep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ jobs:
steps:
- name: clone application source code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- name: install package using aqua
uses: aquaproj/aqua-installer@6ce1f8848ec8e61f14d57bd5d7597057a6dd187c # v3.0.1
with:
aqua_version: v2.29.0
- name: full scan
run: |
semgrep \
github-comment exec --token ${{ secrets.TOKEN }} -- semgrep \
--sarif --output report.sarif \
--metrics=off \
--config="p/default"
Expand Down

0 comments on commit f0279e2

Please sign in to comment.