Revert to node 14 until we update the base image #243
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: Create snapshot release | |
on: | |
push: | |
branches: | |
- develop | |
paths-ignore: | |
- "**/*.md" | |
repository_dispatch: | |
types: | |
- snapshot-release | |
workflow_dispatch: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
node: [18] | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{matrix.node}} | |
- name: Setup Docker | |
if: ${{matrix.os == 'ubuntu-latest'}} | |
run: | | |
docker pull s1hofmann/nut-ci:latest | |
docker run -it -d --name nut-ci --shm-size 8gb --user $(id -u):$(id -g) -v ${PWD}:${PWD}:rw s1hofmann/nut-ci:latest bash | |
- name: Install | |
run: npm ci | |
- name: Install @nut-tree/libnut@next | |
run: npm i @nut-tree/libnut@next | |
- name: Compile | |
run: npm run compile | |
- name: Init window e2e test subpackage | |
run: npm --prefix e2e/window-test ci | |
- name: Run tests | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: | | |
npx playwright install --with-deps | |
npm test | |
- name: Run Docker E2E tests | |
if: ${{matrix.os == 'ubuntu-latest'}} | |
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} 14" | |
- name: Run Electron e2e test subpackage | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: npm --prefix e2e/electron-test cit | |
deploy: | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: "https://registry.npmjs.org" | |
- name: Install | |
run: npm ci | |
- name: Install @nut-tree/libnut@next | |
run: npm i @nut-tree/libnut@next | |
- name: Create snapshot release | |
run: bash ./.build/pre-release.sh | |
- name: Publish snapshot release to npm | |
run: npm run publish-next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: "https://npm.pkg.github.com" | |
- name: Publish snapshot release to GPR | |
run: npm run publish-next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |