Skip to content
Snippets Groups Projects
test.yml 2.18 KiB
Newer Older
name: Test

on:
  push:
    branches:
      - master
      - develop
  pull_request:
    branches:
      - master
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Setup Node.js environment
        uses: actions/setup-node@v2.4.0
        with:
          # Version Spec of the version to use.  Examples: 12.x, 10.15.1, >=10.15.0
          node-version: '>= 16.9.1'
          # Set this option if you want the action to check for the latest available version that satisfies the version spec
          check-latest: false
      - run: npm install -g @quasar/cli
      - run: npm install
      - run: quasar build
      - run: pwd && ls -al *

      # DOCKER RELATED
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Build
        uses: docker/build-push-action@v2
        with:
          context: .
          file: ./Dockerfile
          platforms: linux/amd64,linux/arm/v7,linux/arm64
          push: false
    needs: test
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]

    steps:
      # GET LATEST CODE
      - name: Checkout latest code
        uses: actions/checkout@master
        with:
          fetch-depth: 0

Griefed's avatar
Griefed committed
      - name: We are running on
Griefed's avatar
Griefed committed
        run: echo ${{ matrix.os }} && echo ${{ github.runner_os }}
      # SETUP NODE ENVIRONMENT
      - name: Setup Node.js environment
        uses: actions/setup-node@v2.4.0
        with:
          # Version Spec of the version to use.  Examples: 12.x, 10.15.1, >=10.15.0
          node-version: '>= 16.9.1'
          # Set this option if you want the action to check for the latest available version that satisfies the version spec
          check-latest: false

      - name: Build/release Electron app
        uses: vedaprakashms/quasar_electron_build@V0.0.1
        with:
          # GitHub token, automatically provided to the action
          # (No need to define this secret in the repo settings)
          github_token: ${{ secrets.github_token }}

      - name: List files
        run: ls dist/electron