简体   繁体   中英

Is it possible to have Github Actions for Elixir with Windows?

Background

I have GithubActions script that tries to do some basic setup for Elixir using a Windows system. The reason I need it to be windows is because I am releasing for Windows.

Problem

So the start of my script is as simple as I could make it:

name: build

env:
  MIX_ENV: test
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:

  build:
    name: Build on Windows
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2
    - name: Setup elixir
      uses: actions/setup-elixir@v1
      with:
        elixir-version: '1.13.x' # Define the elixir version [required]
        otp-version: '24.2.x' # Define the OTP version [required]
    
    - name: Install Dependencies
      run: mix deps.get
    
    - name: Run credo code analyser
      run: mix credo --strict

However, the run fails:

在此处输入图像描述

Questions

  1. Am I doing something wrong?
  2. Is it possible to have a GitHub Action that runs Elixir in Windows?
  3. If not, how can I test my code in GitHub Actions while making sure it would also work for Windows?

It looks like the action moved to a new location and now does support windows. Reference the upgraded action here:

erlef/setup-beam@v1

Check the docs for the required syntax as the functionality got wrapped into a bigger context.

See: https://github.com/erlef/setup-beam

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM