简体   繁体   English

Windows 是否可以对 Elixir 进行 Github 操作?

[英]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.我有 GithubActions 脚本,它尝试使用 Windows 系统为 Elixir 进行一些基本设置。 The reason I need it to be windows is because I am releasing for Windows.我需要它为 windows 的原因是因为我正在为 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?是否有可能在 Windows 中运行 Elixir 的 GitHub 操作?
  3. If not, how can I test my code in GitHub Actions while making sure it would also work for Windows?如果没有,我如何在 GitHub 操作中测试我的代码,同时确保它也适用于 Windows?

It looks like the action moved to a new location and now does support windows.看起来动作已移至新位置,现在确实支持 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见: https://github.com/erlef/setup-beam

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 github 操作在 Windows 上测试 Perl - Testing Perl on Windows with github actions Python 使用 Github 测试 Windows 上的操作 - Python testing with Github Actions on Windows 如何在 Windows 的 GitHub Actions 中拥有两个 Windows 驱动器“C:”和“D:”? - How can I have two windows drives `C:` and `D:` within GitHub Actions in windows? 如何在 Windows 中获得最新版本的 Elixir - How to have latest version of Elixir in Windows GitHub Actions 将更改推送到 Windows 上的远程/源 - GitHub Actions push changes to remote/origin on windows 如何在 Windows 版本的 GitHub 操作上设置 Bakeware env vars? - How to set Bakeware env vars on GitHub Actions for a Windows release? 如何在 Github 操作上执行 MSI 文件(Windows 最新运行程序) - How to execute MSI file on Github Actions (windows-latest runner) Hashlib 通过 GitHub 动作对 Ubuntu 和 Windows 产生不同的结果 - Hashlib produces different results on Ubuntu and Windows via GitHub actions 如何在 Windows 最新 VM 中为 Xamarin 应用程序设置 Github 操作? - How to set-up Github Actions for Xamarin apps in windows-latest VM? GitHub 上 Windows 环境中的测试容器操作:“找不到有效的 Docker 环境。 请查看日志并检查配置” - Testcontainers in Windows environment on GitHub Actions: “Could not find a valid Docker environment. Please see logs and check configuration”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM