Create main github actions file
This commit is contained in:
parent
40d7b1cf02
commit
ceb04561cd
1 changed files with 32 additions and 17 deletions
49
.github/workflows/main.yml
vendored
49
.github/workflows/main.yml
vendored
|
|
@ -2,29 +2,30 @@
|
||||||
|
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
# Controls when the action will run.
|
# Controls when the action will run.
|
||||||
on:
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
push:
|
push:
|
||||||
|
branches: [ master ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [ master ]
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * 1'
|
# 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
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
test_stable:
|
test_devel:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
firefox: [ '73.0' ]
|
firefox: [ '73.0' ]
|
||||||
include:
|
include:
|
||||||
- nim-version: '1.6.0'
|
- nim-version: 'stable'
|
||||||
cache-key: 'stable'
|
cache-key: 'stable'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Checkout submodules
|
|
||||||
run: git submodule update --init --recursive
|
|
||||||
|
|
||||||
- name: Setup firefox
|
- name: Setup firefox
|
||||||
uses: browser-actions/setup-firefox@latest
|
uses: browser-actions/setup-firefox@latest
|
||||||
with:
|
with:
|
||||||
|
|
@ -34,39 +35,53 @@ jobs:
|
||||||
id: get-date
|
id: get-date
|
||||||
run: echo "::set-output name=date::$(date "+%Y-%m-%d")"
|
run: echo "::set-output name=date::$(date "+%Y-%m-%d")"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Cache choosenim
|
- name: Cache choosenim
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.choosenim
|
path: ~/.choosenim
|
||||||
key: ${{ runner.os }}-choosenim-${{ matrix.cache-key }}
|
key: ${{ runner.os }}-choosenim-${{ matrix.cache-key }}
|
||||||
|
|
||||||
- name: Cache nimble
|
- name: Cache nimble
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.nimble
|
path: ~/.nimble
|
||||||
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
|
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
|
||||||
|
|
||||||
|
- uses: jiro4989/setup-nim-action@v1
|
||||||
|
with:
|
||||||
|
nim-version: "${{ matrix.nim-version }}"
|
||||||
|
|
||||||
- name: Install geckodriver
|
- name: Install geckodriver
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -qq update
|
sudo apt-get -qq update
|
||||||
sudo apt-get install autoconf libtool libsass-dev
|
sudo apt-get install autoconf libtool
|
||||||
|
git clone -b 3.5.4 https://github.com/sass/libsass.git
|
||||||
|
cd libsass
|
||||||
|
autoreconf --force --install
|
||||||
|
./configure \
|
||||||
|
--disable-tests \
|
||||||
|
--disable-static \
|
||||||
|
--enable-shared \
|
||||||
|
--prefix=/usr
|
||||||
|
sudo make -j5 install
|
||||||
|
cd ..
|
||||||
|
|
||||||
wget https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz
|
wget https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz
|
||||||
mkdir geckodriver
|
|
||||||
tar -xzf geckodriver-v0.29.1-linux64.tar.gz -C geckodriver
|
tar -xzf geckodriver-v0.29.1-linux64.tar.gz -C geckodriver
|
||||||
export PATH=$PATH:$PWD/geckodriver
|
export PATH=$PATH:$PWD/geckodriver
|
||||||
|
|
||||||
- name: Install choosenim
|
- name: Install choosenim
|
||||||
run: |
|
run: |
|
||||||
export CHOOSENIM_CHOOSE_VERSION="${{ matrix.nim-version }}"
|
export CHOOSENIM_CHOOSE_VERSION="stable"
|
||||||
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh
|
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh
|
||||||
sh init.sh -y
|
sh init.sh -y
|
||||||
export PATH=$HOME/.nimble/bin:$PATH
|
export PATH=$HOME/.nimble/bin:$PATH
|
||||||
nimble refresh -y
|
nimble refresh -y
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
export PATH=$HOME/.nimble/bin:$PATH
|
|
||||||
export MOZ_HEADLESS=1
|
export MOZ_HEADLESS=1
|
||||||
nimble -y install
|
nimble -y install
|
||||||
nimble -y test
|
nimble -y test
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue