Skip to content

Fix time problems on Windows 10 #195

Fix time problems on Windows 10

Fix time problems on Windows 10 #195

Workflow file for this run

name: Tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Running tests on Windows under Windows Subsystem for Linux (WSL)
windows:
strategy:
fail-fast: false
matrix:
python: [python38, python39]
rfVersion: ['3.1.2', '3.2', '3.2.1', '3.2.2', '4.0', '4.0.1', '4.0.2', '4.0.3', '4.1']
runs-on: windows-latest
name: Windows (${{ matrix.python }}, robotframework-${{ matrix.rfVersion }})
defaults:
run:
shell: wsl-bash {0}
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Windows Subsystem for Linux
uses: Vampire/setup-wsl@v1
with:
# Using Ubuntu to setup WSL
distribution: Ubuntu-20.04
additional-packages:
dos2unix
- name: Install Nix
run: |
# Nix installer does not support root installation we need a user
useradd test -m
# Create /nix folder with proper permissions
# This is required because otherwise installer gets stuck most likely at running sudo
install -d -m755 -o test -g test /nix
# Download Nix installer
sudo -iu test curl -o ./install-nix.sh -L https://nixos.org/nix/install
# Run installer as single user installation and we do not need a channel
sudo -iu test sh ./install-nix.sh --no-daemon --no-channel-add
- name: Run tests
run: |
# Change line endings
dos2unix default.nix
# Run the tests in project directory where default.nix resides
# We need login shell for that so that .profile is getting read
sudo -iu test sh -c "nix-build $PWD --argstr python ${{ matrix.python }} --argstr rfVersion ${{ matrix.rfVersion }}"
exit $(cat /home/test/result/exitCode)
linux:
strategy:
fail-fast: false
matrix:
python: [python38, python39]
rfVersion: ['3.1.2', '3.2', '3.2.1', '3.2.2', '4.0', '4.0.1', '4.0.2', '4.0.3', '4.1']
runs-on: ubuntu-latest
name: Linux (${{ matrix.python }}, robotframework-${{ matrix.rfVersion }})
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v13
- name: Run tests
run: |
nix-build --argstr python ${{ matrix.python }} --argstr rfVersion ${{ matrix.rfVersion }}
exit $(cat ./result/exitCode)
macos:
strategy:
fail-fast: false
matrix:
python: [python38, python39]
rfVersion: ['3.1.2', '3.2', '3.2.1', '3.2.2', '4.0', '4.0.1', '4.0.2', '4.0.3', '4.1']
runs-on: macos-latest
name: MacOS (${{ matrix.python }}, robotframework-${{ matrix.rfVersion }})
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v13
- name: Run tests
run: |
nix-build --argstr python ${{ matrix.python }} --argstr rfVersion ${{ matrix.rfVersion }}
exit $(cat ./result/exitCode)