Test in a container #1084
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: Test in a container | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
schedule: | |
- cron: "5 */6 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
in-container: | |
runs-on: | |
- namespace-profile-e2e-small | |
container: | |
image: node:21 | |
env: | |
NSC_CACHE_PATH: ${{ env.NSC_CACHE_PATH }} | |
volumes: | |
- /cache:/cache | |
options: --cap-add=SYS_ADMIN | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install sudo | |
run: | | |
apt-get update -y && apt-get install -y sudo | |
- name: Set up NPM cache | |
uses: ./ # Uses an action in the root directory | |
with: | |
path: .npm | |
- name: Run npm install | |
run: npm install | |
- name: Print cache metadata file | |
run: | | |
ls -al /cache/.ns | |
cat /cache/.ns/cache-metadata.json |